Excel guide · 3 min read
Excel formulas cheat sheet: the 25 everyone should know
Sample data
Every result on this page was calculated from this sheet by the same spreadsheet engine the Cellwise app uses.
| A | B | C | D | |
|---|---|---|---|---|
| 1 | Employee | Dept | Salary | Rating |
| 2 | Priya Shah | Sales | 62000 | 4 |
| 3 | Marcus Bell | IT | 78000 | 3 |
| 4 | Elena Ruiz | Sales | 55000 | 5 |
| 5 | Tom Fischer | Finance | 69000 | 4 |
| 6 | Aisha Khan | IT | 83500 | 5 |
| 7 | Jonah Price | Sales | 48000 | 2 |
Math and counting (1-6)
Six functions handle most totals and counts. Each takes a range such as C2:C7.
=SUM(C2:C7)adds up a range.=AVERAGE(C2:C7)gives the mean.=MIN(C2:C7)and=MAX(C2:C7)return the smallest and largest value.=COUNT(C2:C7)counts cells that hold numbers.=COUNTA(A2:A7)counts cells that are not empty, including text.=ROUND(number, digits)rounds the actual value. Number formatting only changes what you see; ROUND changes what later formulas use.
Result: 65917
Formulas nest, so you can round an average in one step. The average salary is 65,916.67, rounded to 65,917.
Logic (7-11)
Logic functions let a sheet make decisions: flag a row, pick a rate, or replace an error with something readable.
=IF(test, if_true, if_false)picks between two results.=AND(test1, test2, ...)is TRUE only when every test is true.=OR(test1, test2, ...)is TRUE when any test is true.=IFS(test1, value1, test2, value2, ...)handles several bands without nesting (Excel 2019 and later).=IFERROR(formula, fallback)shows a fallback instead of an error.
Result: Raise review
IF and AND together flag strong performers paid below 70,000. Priya has a rating of 4 and a salary of 62,000, so she is flagged for a raise review.
Conditional counts and sums (12-15)
These answer questions like "how many Sales staff" or "total salary in IT". The S versions take several conditions.
=COUNTIF(range, criteria)counts matching cells, such as=COUNTIF(B2:B7,"Sales").=COUNTIFS(range1, criteria1, range2, criteria2, ...)counts rows that match every condition.=SUMIF(range, criteria, sum_range)adds the values on matching rows.=SUMIFS(sum_range, range1, criteria1, ...)adds with several conditions. Note that the sum range comes first here, unlike SUMIF.
Result: 117000
Salaries of Sales staff rated 4 or above: Priya and Elena, 117,000 in total.
Lookups (16-18)
Lookups pull a value from another row or table, such as a price for a product code or a salary for a name.
=XLOOKUP(value, lookup_range, return_range, if_not_found)finds a value and returns a match from any column (Excel 365 and 2021).=VLOOKUP(value, table, col_num, FALSE)is the classic version. It only looks to the right and needs FALSE for an exact match.=INDEX(return_range, MATCH(value, lookup_range, 0))works in every version and in any direction.
Result: 83500
XLOOKUP finds Aisha Khan and returns her salary: 83,500.
Text (19-21)
Text functions clean up and reshape names, codes and imported data.
=TRIM(text)removes extra spaces, the most common reason a lookup fails on data that looks identical.=LEFT(text, n),=RIGHT(text, n)and=MID(text, start, n)pull characters from the start, end or middle. Pair them with FIND to split at a space or dash.=TEXTJOIN(", ", TRUE, range)joins cells with a separator and can skip blanks. CONCAT and the & operator join without a separator.
Result: Priya
FIND locates the space in "Priya Shah", and LEFT returns everything before it: Priya.
Dates and dynamic arrays (22-25)
The last four cover dates and the newer functions that return whole lists at once.
=TODAY()returns the current date and updates every day.=DATEDIF(start, end, "y")gives whole years between two dates, useful for age or tenure. Use "m" for months or "d" for days.=UNIQUE(range)lists each value once.=FILTER(range, condition)returns every row that matches. UNIQUE and FILTER spill into the cells below and need Excel 365 or 2021.
Result: spills 3 rows × 1 column
| Priya Shah |
| Elena Ruiz |
| Jonah Price |
FILTER spills the three Sales employees: Priya Shah, Elena Ruiz and Jonah Price.
Common mistakes
Forgetting to lock ranges before copying
Use $ (press F4) on lookup tables and fixed cells, such as $A$2:$C$7, so they do not shift when you fill down.
Leaving out FALSE in VLOOKUP
Without it VLOOKUP does an approximate match and can quietly return the wrong row.
Typing numbers as text
Numbers with units or leading spaces are ignored by SUM and break lookups. Keep number cells pure and use number formats for units.
Using new functions in shared files
XLOOKUP, IFS, UNIQUE and FILTER show #NAME? in older Excel. Check what version your colleagues use.
FAQ
What are the most used Excel formulas?
SUM, AVERAGE, IF, COUNTIF, SUMIF and a lookup (XLOOKUP or VLOOKUP) cover most daily work. Learn those six first, then IFERROR and SUMIFS.
What is the difference between a formula and a function?
A formula is anything you type that starts with =. A function is a named, built-in calculation such as SUM or IF that you use inside a formula.
How do I see all formulas on a sheet?
Press Ctrl+` (the grave accent key, next to 1) or go to Formulas > Show Formulas. Press it again to go back to results.
Functions used
SUMAdds numbersAVERAGEMean of numbersMINSmallest numberMAXLargest numberCOUNTCounts numbersCOUNTACounts non-empty cellsROUNDRounds to digitsIFPicks a result from a testANDTrue if all tests are trueORTrue if any test is trueIFSFirst true test winsIFERRORFallback when a formula errorsCOUNTIFCounts cells that matchCOUNTIFSCounts with several conditionsSUMIFAdds cells that matchSUMIFSAdds with several conditionsXLOOKUPModern lookup in any directionVLOOKUPVertical lookupINDEXValue at a positionMATCHPosition of a valueTRIMRemoves extra spacesLEFTCharacters from the startRIGHTCharacters from the endMIDCharacters from the middleFINDPosition of text (case-sensitive)TEXTJOINJoins with a separatorCONCATJoins textTODAYToday’s dateDATEDIFWhole years, months or days betweenUNIQUERemoves duplicates, spillsFILTERKeeps matching rows, spills
Related guides
- Excel IF statement with multiple conditions
- VLOOKUP vs XLOOKUP
- SUMIFS with multiple criteria in Excel
- Absolute vs relative cell references in Excel
- #NAME? error in Excel
Updated