Об этом упражнении
Набор данных (строк: 130) на 2 листах, 2 ячейки ответа, около 7 мин. Проверка прямо в браузере: значение и формула, которая его даёт, с обратной связью о том, что исправить.
Как решить
- Orders!E2
=IFERROR(VLOOKUP(C2,Products!$A$2:$D$31,4,FALSE),"Not found") - Orders!H2
=COUNTIF(E2:E101,"Not found")
VLOOKUP with FALSE returns #N/A when the SKU is not in the first column of the table, and any SUM or AVERAGE over a column that contains #N/A becomes #N/A too. IFERROR(value, value_if_error) evaluates the lookup and, only if it produces an error, returns the second argument instead — here the text "Not found" — so the five discontinued lines become readable text and the rest keep their prices. COUNTIF over the finished column counts the text cells: 5 lines need a price decision.
Pitfall 1: IFERROR hides every error, including a #REF! from a broken table reference or a #VALUE! from a typo; IFNA replaces only #N/A, so a genuinely broken formula still shows its error — prefer IFNA when the only expected error is "no match". Pitfall 2: the fallback must be meaningful to whoever consumes the column; "Not found" works for humans, 0 is dangerous because it looks like a free item in totals, and an empty string "" silently disappears from counts. Pitfall 3: in Excel 2003 and earlier IFERROR did not exist, which is why old workbooks use =IF(ISNA(VLOOKUP(...)),"Not found",VLOOKUP(...)) — the lookup runs twice. Alternatives: =IFNA(VLOOKUP(C2,Products!$A$2:$D$31,4,FALSE),"Not found"); =XLOOKUP(C2,Products!$A$2:$A$31,Products!$D$2:$D$31,"Not found") has the fallback built in as its 4th argument (365). Data-quality note: the count in H2 is the real deliverable — the five SKUs need either a replacement product or a clean-up of the order file, and the lookup column is where that gap becomes visible.
Другие рабочие способы
- =IFNA(VLOOKUP(C2,Products!$A$2:$D$31,4,FALSE),"Not found") — catches only #N/A, lets other errors through
- =XLOOKUP(C2,Products!$A$2:$A$31,Products!$D$2:$D$31,"Not found") — Excel 365; the 4th argument is the fallback
- =IF(ISNA(VLOOKUP(C2,Products!$A$2:$D$31,4,FALSE)),"Not found",VLOOKUP(C2,Products!$A$2:$D$31,4,FALSE)) — the pre-2007 pattern
- =COUNTA(E2:E101)-COUNT(E2:E101) in H2 — text cells = everything minus the numbers
Частые ошибки
Putting the fallback inside VLOOKUP, e.g. =VLOOKUP(C2,Products!$A$2:$D$31,4,"Not found"): the 4th argument of VLOOKUP is the match type, not a fallback. The error handler wraps the whole lookup — IFERROR( lookup , "Not found" ).
Как мы проверяем
Принимается любая формула, которая даёт верный результат, если только задание не называет функцию: тогда другая функция даёт половину балла. Мы сравниваем значения с небольшим допуском и не учитываем регистр и пробелы в тексте. Верное число, введённое вручную вместо формулы, даёт половину балла. Задания с несколькими ячейками получают полный балл, если верны 100% ячеек, и половину — если верны от 50%. Там, где это важно, мы также меняем входную ячейку в копии вашего листа и проверяем, что формула пересчитывается правильно.
Ответы рассчитаны по правилам Excel 365 и 16 ноября 2026 г. сверены в нашей системе проверки. Автор: GridBelt team.