Zum Inhalt springen
GridBelt
  • Excel-Test
  • Übungen
  • Programme
  • Preise
Anmelden
Kostenlosen Test starten
  • Excel-Test
  • Übungen
  • Programme
  • Preise
AnmeldenKonto erstellen
Kostenlosen Test starten
GridBelt

Excel üben – direkt im Browser.

Excel-Test

  • Stufe 1: Anfänger
  • Stufe 2: Fortgeschrittene
  • Stufe 3: Experten
  • Excel-Test in 7 Tagen
  • Bestenliste
  • Excel-Test im Bewerbungsverfahren
  • Excel-Test von Indeed

Übungen

  • Alle Übungen
  • Programme
  • Für Anfänger

Ratgeber

  • Excel-Formeln
  • Excel-Tastenkombinationen

Unternehmen

  • Über uns
  • Preise
  • So bewerten wir

© GridBelt. Alle Rechte vorbehalten.

  • Datenschutzerklärung
  • Nutzungsbedingungen
  • Rückerstattungsrichtlinie

Excel ist eine Marke der Microsoft Corporation. Indeed, TestGorilla, SHL und andere Marken sind Eigentum ihrer jeweiligen Inhaber. GridBelt ist eine unabhängige Übungsplattform, steht mit Microsoft, TestGorilla, SHL oder Indeed in keiner Verbindung und wird von keinem dieser Unternehmen unterstützt oder gesponsert.

  1. Übungen
  2. /
  3. IF function

IFERROR practice: margin % for 50 products without #DIV/0!

  • Fortgeschrittene
  • ~6 Min.
  • IF function

Übungstext auf Englisch

The buying team maintains a price list of 50 products with the unit cost (column D) and the selling price (column E). They report margin on cost — how much the selling price exceeds the cost, as a percentage of the cost: (price − cost) ÷ cost. 4 promotional items were received free from a supplier, so their cost is 0 and the division has no answer. The report must show n/a on those rows instead of an error, because the column is summarised further down the chain.

Ihre Aufgabe

  1. 1Click F2. The unit cost is in D2 and the selling price in E2; the margin on cost is (E2-D2)/D2.
  2. 2Wrap the division in IFERROR: the first argument is the calculation, the second is what to show when it fails — the text "n/a" in quotes.
  3. 3Press Enter and fill F2 down to F51 (double-click the fill handle, or select F2:F51 and press Ctrl+D / ⌘D). The column is already formatted as a percentage.
  4. 4Scroll to the promotional items (cost $0.00): they must read n/a, not #DIV/0!. Then click Check (Ctrl+Enter / ⌘+Return).

Antwortzellen

Feedback

Geben Sie Ihre Formel in die Tabelle ein, drücken Sie Enter und dann „Prüfen“. Wir bewerten den Wert in jeder Antwortzelle und die Formel dahinter.

Aufgaben

  1. Nicht geprüftIn F2, calculate the margin on cost, (E2-D2)/D2, so that the zero-cost rows show "n/a" instead of #DIV/0! — IFERROR is the usual tool — then fill the formula down to F51.

Für Tabellenaufgaben empfehlen wir einen Computer. Die Tabelle scrollt innerhalb dieses Rahmens.

StartInsertFormulasDataView
A1fxIhre Arbeitsmappe wird vorbereitet…
A
B
C
D
E
F
G
H
I
J
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
Sheet1

Geben Sie Ihre Formel in die Tabelle ein und prüfen Sie dann.

Über diese Übung

Ein Datensatz mit 50 Zeilen auf einem Tabellenblatt, eine Antwortzelle, etwa 6 Minuten. Bewertet in Ihrem Browser: der Wert und die Formel dahinter, mit Feedback, das die Korrektur benennt.

So lösen Sie die Aufgabe

  • F2=IFERROR((E2-D2)/D2,"n/a")

Dividing by an empty or zero cost raises #DIV/0!, and one error cell is enough to break every AVERAGE or SUM that reads the column. IFERROR(value, value_if_error) returns the first argument when it computes normally and the second when it produces any error, so =IFERROR((E2-D2)/D2,"n/a") shows the margin for priced items and n/a for the four free ones. Filled down, the same formula handles every row without you knowing in advance which products have a zero cost.

Pitfall 1: IFERROR hides every error, not just #DIV/0! — a typo like (E2-D2)/D3 or a text value in column E is silently replaced by n/a too. When only the zero-cost case is expected, =IF(D2=0,"n/a",(E2-D2)/D2) is the more honest formula; IFERROR is the pragmatic choice when the data can hold several kinds of junk. Pitfall 2: returning 0 or "" instead of n/a changes the statistics — AVERAGE ignores text but counts a 0, so a 0% margin on free stock drags the average down. Pitfall 3: margin on cost (markup) is not margin on price: (E2-D2)/E2 never divides by zero here and gives a different, smaller number; always state which one a report uses. Alternatives: IFNA only catches #N/A (useful around lookups, useless here); in Excel 365, =LET(m,(E2-D2)/D2,IF(ISERROR(m),"n/a",m)) avoids computing the division twice. Formatting: the fallback text sits in a column formatted 0.0% — text ignores number formats, which is why n/a shows as typed.

Andere Wege, die funktionieren

  • =IF(D2=0,"n/a",(E2-D2)/D2) — explicit test on the cost; only the expected error case is handled
  • =IF(ISERROR((E2-D2)/D2),"n/a",(E2-D2)/D2) — the pre-2007 pattern IFERROR replaced
  • =IFERROR(E2/D2-1,"n/a") — algebraically the same margin on cost

Häufige Fehler

Writing =IFERROR((E2-D2)/D2) with no second argument, or putting the fallback first — IFERROR needs the calculation first and the replacement value second, in quotes when it is text.

So bewerten wir

Jede Formel, die das richtige Ergebnis liefert, wird akzeptiert, außer die Aufgabe nennt eine Funktion: Dann bringt eine andere Funktion die halbe Punktzahl. Wir vergleichen Werte mit einer kleinen Toleranz und ignorieren bei Text Groß- und Kleinschreibung sowie Leerzeichen. Eine richtige Zahl, die statt einer Formel von Hand eingetippt wurde, bringt die halbe Punktzahl. Aufgaben mit mehreren Zellen bringen die volle Punktzahl, wenn 100% der Zellen stimmen, und die halbe ab 50%. Wo es darauf ankommt, ändern wir außerdem eine Eingabezelle in einer Kopie Ihrer Tabelle und prüfen, ob Ihre Formel mitzieht.

Antworten nach den Regeln von Excel 365 berechnet und am 16. November 2026 in unserem Bewertungssystem geprüft. Verfasst von GridBelt team.

In diesen Programmen

  • Excel for Data AnalystsTag 4
  • Excel for Accounting and BookkeepingTag 3
  • Learn Excel From ScratchTag 10

Ähnliche Übungen

  • Flag rows with missing dataFortgeschrittene, ~5 Min.
  • Commission tiers with nested IF, IFS or a lookupFortgeschrittene, ~8 Min.
  • Pass or Fail with IFAnfänger, ~4 Min.

Funktionsreferenz

Offizielle Dokumentation

Nächste Übung

Commission tiers with nested IF, IFS or a lookup