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.
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
| Formula | What it does | Example |
|---|---|---|
| SUM | Adds all numbers in a range. | =SUM(B2:B50) |
| AVERAGE | Returns the arithmetic mean of the numbers in a range. | =AVERAGE(B2:B50) |
| COUNT | Counts cells that contain numbers. | =COUNT(B2:B50) |
| COUNTA | Counts cells that are not empty (text or numbers). | =COUNTA(A2:A50) |
| MIN / MAX | Returns the smallest or largest number in a range. | =MAX(B2:B50) |
| ROUND | Rounds a number to a set number of decimal places. | =ROUND(B2,2) |
| SUMPRODUCT | Multiplies matching items in two ranges and adds the results. | =SUMPRODUCT(B2:B10,C2:C10) |
Criteria & aggregation
| Formula | What it does | Example |
|---|---|---|
| SUMIF | Adds the cells that meet one condition. | =SUMIF(A:A,"East",B:B) |
| SUMIFS | Adds the cells that meet several conditions. | =SUMIFS(C:C,A:A,"East",B:B,">100") |
| COUNTIF | Counts the cells that meet one condition. | =COUNTIF(A:A,">100") |
| COUNTIFS | Counts the cells that meet several conditions. | =COUNTIFS(A:A,"East",B:B,">0") |
| AVERAGEIF | Averages the cells that meet one condition. | =AVERAGEIF(A:A,"Yes",B:B) |
Lookups
| Formula | What it does | Example |
|---|---|---|
| XLOOKUP | Finds 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) |
| VLOOKUP | Looks 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 / MATCH | MATCH 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
| Formula | What it does | Example |
|---|---|---|
| IF | Returns one value if a test is true and another if it is false. | =IF(B2>=60,"Pass","Fail") |
| IFS | Checks several conditions in order and returns the result for the first true one. | =IFS(B2>=90,"A",B2>=80,"B",TRUE,"C") |
| AND / OR | AND is true only if every test is true; OR is true if any test is true. | =IF(AND(B2>0,C2="Paid"),"OK","Check") |
| IFERROR | Returns your own value instead of an error such as #N/A or #DIV/0!. | =IFERROR(B2/C2,0) |
Dates
| Formula | What it does | Example |
|---|---|---|
| TODAY | Returns today's date and updates each time the workbook recalculates. | =TODAY() |
| EDATE | Returns the date a given number of months before or after a start date. | =EDATE(A2,3) |
| NETWORKDAYS | Counts working days (Monday to Friday) between two dates, minus optional holidays. | =NETWORKDAYS(A2,B2,H2:H10) |
Text
| Formula | What it does | Example |
|---|---|---|
| LEFT / RIGHT | Returns a number of characters from the start or end of a text string. | =LEFT(A2,3) |
| MID | Returns characters from the middle of a text string, from a start position. | =MID(A2,4,2) |
| TRIM | Removes extra spaces, leaving single spaces between words. | =TRIM(A2) |
| LEN | Counts the characters in a text string. | =LEN(A2) |
| TEXT | Formats a number or date as text in the pattern you choose. | =TEXT(A2,"yyyy-mm-dd") |
| CONCAT | Joins text from several cells or ranges (Excel 2019 and later). | =CONCAT(A2," ",B2) |
| TEXTJOIN | Joins text with a delimiter and can skip empty cells. | =TEXTJOIN(", ",TRUE,A2:A10) |
Dynamic arrays (Microsoft 365 / Excel 2021+)
| Formula | What it does | Example |
|---|---|---|
| FILTER | Returns only the rows that meet a condition; the result spills into neighbouring cells. | =FILTER(A2:C100,B2:B100>50) |
| UNIQUE | Returns the distinct values in a range. | =UNIQUE(A2:A100) |
| SORT | Returns 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
- Windows: AutoSum Alt+= · lock references F4 · show formulas Ctrl+` · Insert Function Shift+F3
- Mac: AutoSum ⌘+Shift+T · lock references ⌘+T · show formulas ⌃+` · Formula Builder Shift+F3
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: