ExcelShortcutSheetWin · Mac · Printable

Excel Formulas Cheat Sheet

34 Excel formulas you reach for most: totals, criteria sums, lookups, logic, dates, text and dynamic arrays. Pair it with the full Excel shortcuts cheat sheet.

Keyboard shortcuts for AutoSum, absolute references and Show Formulas are on the main sheet.
Open shortcuts sheet →

Each row gives the function, a one-line plain-English definition and an example you can paste and adapt. Ranges such as A:A and B2:B50 are placeholders for your own data. Functions in the dynamic-array group show #NAME? in Excel 2019 and earlier.

Sums, counts & averages

FormulaWhat it doesExample
SUMAdds all numbers in a range.=SUM(B2:B50)
AVERAGEReturns the arithmetic mean of the numbers in a range.=AVERAGE(B2:B50)
COUNTCounts cells that contain numbers.=COUNT(B2:B50)
COUNTACounts cells that are not empty (text or numbers).=COUNTA(A2:A50)
MIN / MAXReturns the smallest or largest number in a range.=MAX(B2:B50)
ROUNDRounds a number to a set number of decimal places.=ROUND(B2,2)
SUMPRODUCTMultiplies matching items in two ranges and adds the results.=SUMPRODUCT(B2:B10,C2:C10)

Criteria & aggregation

FormulaWhat it doesExample
SUMIFAdds the cells that meet one condition.=SUMIF(A:A,"East",B:B)
SUMIFSAdds the cells that meet several conditions.=SUMIFS(C:C,A:A,"East",B:B,">100")
COUNTIFCounts the cells that meet one condition.=COUNTIF(A:A,">100")
COUNTIFSCounts the cells that meet several conditions.=COUNTIFS(A:A,"East",B:B,">0")
AVERAGEIFAverages the cells that meet one condition.=AVERAGEIF(A:A,"Yes",B:B)

Lookups

FormulaWhat it doesExample
XLOOKUPFinds a value in one range and returns the matching item from another; exact match by default.=XLOOKUP(E2,A:A,C:C,"Not found")
XLOOKUP (last match)Searches from the bottom up by setting search_mode to -1.=XLOOKUP(E2,A:A,C:C,"Not found",0,-1)
XLOOKUP (wildcard)Matches text patterns with * and ? by setting match_mode to 2.=XLOOKUP("*"&E2&"*",A:A,C:C,"Not found",2)
VLOOKUPLooks down the first column of a table and returns a value from a column to the right; add FALSE for an exact match.=VLOOKUP(E2,A:C,3,FALSE)
INDEX / MATCHMATCH finds the row position, INDEX returns the value at that position; works in any direction.=INDEX(C:C,MATCH(E2,A:A,0))

Logic & errors

FormulaWhat it doesExample
IFReturns one value if a test is true and another if it is false.=IF(B2>=60,"Pass","Fail")
IFSChecks several conditions in order and returns the result for the first true one.=IFS(B2>=90,"A",B2>=80,"B",TRUE,"C")
AND / ORAND is true only if every test is true; OR is true if any test is true.=IF(AND(B2>0,C2="Paid"),"OK","Check")
IFERRORReturns your own value instead of an error such as #N/A or #DIV/0!.=IFERROR(B2/C2,0)

Dates

FormulaWhat it doesExample
TODAYReturns today's date and updates each time the workbook recalculates.=TODAY()
EDATEReturns the date a given number of months before or after a start date.=EDATE(A2,3)
NETWORKDAYSCounts working days (Monday to Friday) between two dates, minus optional holidays.=NETWORKDAYS(A2,B2,H2:H10)

Text

FormulaWhat it doesExample
LEFT / RIGHTReturns a number of characters from the start or end of a text string.=LEFT(A2,3)
MIDReturns characters from the middle of a text string, from a start position.=MID(A2,4,2)
TRIMRemoves extra spaces, leaving single spaces between words.=TRIM(A2)
LENCounts the characters in a text string.=LEN(A2)
TEXTFormats a number or date as text in the pattern you choose.=TEXT(A2,"yyyy-mm-dd")
CONCATJoins text from several cells or ranges (Excel 2019 and later).=CONCAT(A2," ",B2)
TEXTJOINJoins text with a delimiter and can skip empty cells.=TEXTJOIN(", ",TRUE,A2:A10)

Dynamic arrays (Microsoft 365 / Excel 2021+)

FormulaWhat it doesExample
FILTERReturns only the rows that meet a condition; the result spills into neighbouring cells.=FILTER(A2:C100,B2:B100>50)
UNIQUEReturns the distinct values in a range.=UNIQUE(A2:A100)
SORTReturns a range sorted by a column, ascending (1) or descending (-1).=SORT(A2:C100,2,-1)

How to read a formula

Every formula starts with an equals sign. Arguments go inside the brackets, separated by commas (some locales use semicolons). Text criteria go in double quotes, as in "East", and comparison criteria are written as text too, as in ">100". Square brackets in Microsoft's syntax, such as [if_not_found], mark optional arguments.

Choosing between the two lookups? Read XLOOKUP vs VLOOKUP for a side-by-side comparison with examples.

Formula keyboard shortcuts

Also see Excel pivot & chart shortcuts, Windows shortcut keys and Mac shortcuts.

FAQ

What are the most important Excel formulas to learn first?

Start with SUM, AVERAGE and COUNT for totals, IF for decisions, SUMIFS and COUNTIFS for totals that meet conditions, and XLOOKUP (or VLOOKUP in older versions) to pull values from another table. Those cover most everyday reports. Add IFERROR to hide errors and TEXT to format dates and numbers.

What is the difference between SUMIF and SUMIFS?

SUMIF adds cells that meet one condition and puts the sum range last: =SUMIF(range, criteria, sum_range). SUMIFS handles one or more conditions and puts the sum range first: =SUMIFS(sum_range, range1, criteria1, range2, criteria2). SUMIFS works for single conditions too, so many people use it for everything.

Which Excel versions have FILTER, UNIQUE, SORT and XLOOKUP?

These functions are in Excel for Microsoft 365, Excel 2021, Excel 2024, Excel for the web and current Excel for Mac. They are not in Excel 2019 or earlier, where the cells show a #NAME? error. Use VLOOKUP or INDEX/MATCH if you share files with people on older versions.

Converting time to decimal hours for payroll? Try the hours to decimal converter.

Totalling line items for a client bill? The free printable invoice template works out quantity × rate, discount and tax for you.

Last updated: