Learn  /  Cheat sheets

Excel formulas cheat sheet

The modern Excel formulas that replace VLOOKUP, helper columns and most pivot tables, on one printable page.

Cheat sheet5 min readUpdated 18 October 2026
ExcelData analysis
All cheat sheets and guides
All guides and cheat sheets

Lookups

Excel
=XLOOKUP(A2, Products[SKU], Products[Price], "Not found")

// Next smaller match, e.g. tax or discount bands
=XLOOKUP(B2, Bands[From], Bands[Rate], , -1)

// The classic, works in every version
=INDEX(Products[Price], MATCH(A2, Products[SKU], 0))

Two-way lookup

Excel
// Row by region (G2), column by month (H1)
=XLOOKUP(G2, A2:A20, XLOOKUP(H1, B1:M1, B2:M20))

Conditional totals

Excel
=SUMIFS(Sales[Amount], Sales[Region], "North",
        Sales[Date], ">=" & DATE(2026, 1, 1))
=COUNTIFS(Sales[Region], "North", Sales[Amount], ">100")
=AVERAGEIFS(Sales[Amount], Sales[Product], "Espresso")
=MAXIFS(Sales[Amount], Sales[Region], G2)

Filter, sort, unique

Excel
=FILTER(Sales, Sales[Region] = "North", "No rows")

// AND = multiply, OR = add
=FILTER(Sales,
    (Sales[Region] = "North") * (Sales[Amount] > 100))
=FILTER(Sales,
    (Sales[Region] = "North") + (Sales[Region] = "South"))

=SORT(UNIQUE(Sales[Customer]))
=SORTBY(Sales, Sales[Amount], -1)

Top N and columns

Excel
=TAKE(SORTBY(Sales, Sales[Amount], -1), 10)
=CHOOSECOLS(Sales, 1, 3, 4)
=VSTACK(Sales2025, Sales2026)

Group and pivot with a formula

Excel
=GROUPBY(Sales[Region], Sales[Amount], SUM)
=PIVOTBY(Sales[Region], Sales[Month], Sales[Amount], SUM)

LET and LAMBDA

Excel
=LET(total, SUM(Sales[Amount]),
     north, SUMIFS(Sales[Amount], Sales[Region], "North"),
     north / total)

// Save in Formulas > Name Manager as SafeDivide
=LAMBDA(x, y, IF(y = 0, 0, x / y))
=SafeDivide(A2, B2)

Text

Excel
=TRIM(PROPER(A2))
=TEXTBEFORE(A2, "@")
=TEXTAFTER(A2, "@")
=TEXTSPLIT(A2, ",")
=TEXTJOIN(", ", TRUE, B2:B10)

Dates

Excel
// Last and first day of the month
=EOMONTH(A2, 0)
=EOMONTH(A2, -1) + 1

// Three months later, and working days between two dates
=EDATE(A2, 3)
=NETWORKDAYS(A2, B2)

// As text, e.g. 2026-10
=TEXT(A2, "yyyy-mm")

Logic and errors

Excel
=IFS(A2 >= 50, "High", A2 >= 25, "Medium", TRUE, "Low")
=SWITCH(B2, "N", "North", "S", "South", "Other")
=IFERROR(A2 / B2, 0)
=IFNA(VLOOKUP(A2, Products, 3, FALSE), "Missing")

Which version?

FILTER, SORT, UNIQUE, XLOOKUP and LET need Excel 2021 or later. TEXTBEFORE, TEXTAFTER, TEXTSPLIT, TAKE, CHOOSECOLS, VSTACK and LAMBDA need Excel 2024 or Microsoft 365. GROUPBY and PIVOTBY need Microsoft 365.

Good habits

Turn every range into a table (Insert > Table) so formulas read like Sales[Amount] and grow with the data. Use XLOOKUP instead of VLOOKUP, LET to name repeated parts, and keep inputs, calculations and outputs on separate sheets.

Alessandro Ecclesie AgazziWritten by Alessandro Ecclesie Agazzi, analytics engineer in London. Updated 18 October 2026. About me

Found this useful?

New guides and "what's new" explainers on data and AI land here regularly. Follow along on LinkedIn, or share this one with a colleague.