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. INDEX and MATCH

Last order date per customer: MAXIFS or XLOOKUP from the last row

  • Experten
  • ~10 Min.
  • INDEX and MATCH

Übungstext auf Englisch

The Orders sheet holds 400 orders placed in 2026, sorted by date with the oldest first; each row has the order date in column B and the customer in column C. Sales wants a churn watch-list on the Customers sheet: for each of the 30 accounts, the date of its most recent order. A plain lookup returns the first match, which here is the oldest order. You need the last one — either the latest date among that customer's orders, or the last matching row.

Ihre Aufgabe

  1. 1On Customers, click C2. Option A (any Excel since 2019): =MAXIFS(Orders!$B$2:$B$401,Orders!$C$2:$C$401,A2) — the largest date among the rows whose customer is A2.
  2. 2Option B (Excel 365): =XLOOKUP(A2,Orders!$C$2:$C$401,Orders!$B$2:$B$401,,0,-1) — the 6th argument −1 searches from the last row upwards, so the first hit is the most recent order because the sheet is sorted by date.
  3. 3Click the Orders tab while typing to get the Orders! prefix, lock the ranges with F4 (Windows) or ⌘T (Mac), press Enter and fill C2 down to C31.
  4. 4Column C is pre-formatted as a date. If you see a number like 46333, the result is right — it is a date serial; apply a date format (Ctrl+1 / ⌘1) to any cell that shows one.

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üftOn the Customers sheet, in C2, return the most recent order date of the customer in A2 from the Orders sheet (dates in B2:B401, customers in C2:C401) — MAXIFS or XLOOKUP searching from the last row — then fill down to C31.

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 430 Zeilen auf 2 Tabellenblättern, eine Antwortzelle, etwa 10 Minuten. Bewertet in Ihrem Browser: der Wert und die Formel dahinter, mit Feedback, das die Korrektur benennt.

So lösen Sie die Aufgabe

  • Customers!C2=MAXIFS(Orders!$B$2:$B$401,Orders!$C$2:$C$401,A2)

Excel stores a date as a serial number — the count of days since 1 January 1900 — so "the most recent date" is simply the largest number. MAXIFS(dates, customers, A2) takes the maximum of the dates on rows whose customer equals the name in A2, which is the last order whatever the sort order of the sheet. XLOOKUP with search mode −1 reaches the same cell differently: it scans the customer column from the bottom and returns the date of the first match it meets, which is the latest order only because the Orders sheet is sorted oldest-first.

Pitfall 1: XLOOKUP(…,-1) depends on the sort order; a sheet sorted by order ID or by customer breaks it silently, MAXIFS does not care. Pitfall 2: MAXIFS returns 0 for a customer with no orders, which a date format shows as 1900-01-00; XLOOKUP returns #N/A. Wrap either in IF or IFNA when the list can contain prospects. Pitfall 3: the result is a serial number until the cell carries a date format — the grader compares numbers, so an unformatted correct answer still passes, but the report reader will not understand 46,250. Pre-2019 alternatives: =MAX(IF(Orders!$C$2:$C$401=A2,Orders!$B$2:$B$401)) entered with Ctrl+Shift+Enter, =LOOKUP(2,1/(Orders!$C$2:$C$401=A2),Orders!$B$2:$B$401) (the classic "last match" trick, sort-order dependent) and =AGGREGATE(14,6,Orders!$B$2:$B$401/(Orders!$C$2:$C$401=A2),1). Performance: MAXIFS scans 400 rows for each of 30 customers — trivial; on a million-row log a pivot table with Max of Order date is the better tool.

Andere Wege, die funktionieren

  • =XLOOKUP(A2,Orders!$C$2:$C$401,Orders!$B$2:$B$401,,0,-1) — Excel 365; search mode −1 = last to first, relies on the date sort
  • =MAX(IF(Orders!$C$2:$C$401=A2,Orders!$B$2:$B$401)) — array formula (Ctrl+Shift+Enter before Excel 365)
  • =LOOKUP(2,1/(Orders!$C$2:$C$401=A2),Orders!$B$2:$B$401) — the classic last-match trick; also sort-order dependent
  • =AGGREGATE(14,6,Orders!$B$2:$B$401/(Orders!$C$2:$C$401=A2),1) — LARGE(…,1) ignoring the errors produced by non-matching rows

Häufige Fehler

A plain lookup: =XLOOKUP(A2,Orders!$C$2:$C$401,Orders!$B$2:$B$401) or a VLOOKUP returns the first matching row, which on a sheet sorted oldest-first is the customer's earliest order of the year, not the last.

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 10
  • Excel for Sales and MarketingTag 9

Ähnliche Übungen

  • INDEX and MATCH exact lookupFortgeschrittene, ~6 Min.
  • Two-way lookup in a matrixExperten, ~8 Min.
  • Two-criteria lookup (product and region)Experten, ~10 Min.
  • Replace VLOOKUP with XLOOKUPFortgeschrittene, ~6 Min.

Funktionsreferenz

Offizielle Dokumentation

Nächste Übung

Full name with CONCAT or &