Which Excel function should I use?

Start from the task, not the function name. Choose what you want to do and find the formula that does it, with a lesson to practice it.

Read the worked examples, then try the skill yourself.

Start learning

Practice SUMIF now

On this page

Pick a function in three clicks

Choose what you are trying to do. The picker names a function and links to the lesson that practices it. The full table below shows the same answers without JavaScript.

Task to function, with a lesson for each

The formulas are patterns. Replace the ranges with your own. Each lesson link opens a guide with graded exercises on practice data.

TaskPatternPracticeWorth knowing
Add up a column=SUM(B2:B20)SUMTotals a range and ignores text.
Add up rows that meet one condition=SUMIF(A2:A20,"East",C2:C20)SUMIFThe test range comes first, the range to add comes last.
Add up rows that meet two or more conditions=SUMIFS(C2:C20,A2:A20,"East",B2:B20,"Oct")SUMIFSHere the range to add comes first.
Multiply pairs, then add=SUMPRODUCT(B2:B20,C2:C20)SUMPRODUCTQuantity times price without a helper column.
Count cells that hold numbers=COUNT(B2:B20)COUNTCounts numeric cells only.
Count anything that is not empty=COUNTA(A2:A20)COUNTACounts text and numbers.
Count blanks in a column=COUNTBLANK(A2:A20)COUNTBLANKHandy for finding missing entries.
Count rows that meet one condition=COUNTIF(A2:A20,"East")COUNTIFOne range, one test.
Count rows that meet two or more conditions=COUNTIFS(A2:A20,"East",C2:C20,">2000")COUNTIFSEvery pair of range and test must hold.
Average a range=AVERAGE(B2:B20)AVERAGEPlain mean of the numbers.
Average rows that meet a condition=AVERAGEIFS(C2:C20,A2:A20,"East")AVERAGEIF, AVERAGEIFSAverage of only the matching rows.
Find the typical value when a few are extreme=MEDIAN(B2:B20)MEDIANLess distorted by outliers than the mean.
Average with different weights=SUMPRODUCT(B2:B6,C2:C6)/SUM(C2:C6)Weighted averageScores, prices and quantities.
Look up a value by key=XLOOKUP(E2,A2:A20,C2:C20,"Not found")XLOOKUPNeeds Microsoft 365 or Excel 2021 and later.
Look up in older Excel=VLOOKUP(E2,A2:C20,3,FALSE)VLOOKUPThe key must be in the first column; FALSE means exact match.
Look up when the key is not in the first column=INDEX(C2:C20,MATCH(E2,B2:B20,0))INDEX with MATCH, INDEX, MATCHWorks in every modern version.
Show a fallback when a formula errors=IFERROR(B2/C2,0)IFERRORUse it for expected errors, not to hide bad data.
Return one of two results=IF(B2>=100,"Pass","Review")IFA single test with two outcomes.
Choose between several outcomes=IFS(B2>=90,"A",B2>=80,"B",TRUE,"C")IFS, SWITCHList the tests in order; add a final TRUE as the default.
Split text at a separator=TEXTSPLIT(A2,",")TEXTSPLIT, TEXTBEFORE, TEXTAFTERSpills across cells; needs Microsoft 365 or Excel 2021 and later.
Take part of a text by position=LEFT(A2,3)LEFT, RIGHT, MID, FINDLEFT, RIGHT and MID, with FIND to locate a character.
Replace or tidy text=SUBSTITUTE(A2,"-","")SUBSTITUTE, PROPERSUBSTITUTE swaps text; PROPER fixes capitalization.
Join text from several cells=TEXTJOIN(", ",TRUE,A2:A6)TEXTJOIN, CONCATTEXTJOIN adds a separator and can skip blanks.
Build or take apart a date=DATE(2026,11,8)DATE, YEAR, MONTH, DAYKeep dates as real dates, not text.
Count days between two dates=DAYS(B2,A2)DAYSEnd date first, then start date.
Round up to a multiple=CEILING(B2,5)CEILING, ROUNDUPPack sizes, price steps and billing blocks.
Percentage change=(C2-B2)/B2Percentage growth, Actual versus targetFormat the result as a percentage.
Share of a total=B2/SUM($B$2:$B$20)Share of total, Absolute referencesThe dollar signs lock the total range when you copy down.

Common questions

What is the difference between SUMIF and SUMIFS?

SUMIF tests one condition and takes the range to add last. SUMIFS tests one or more and takes the range to add first. Mixing up that order is the most common error.

Should I use XLOOKUP or VLOOKUP?

Use XLOOKUP if everyone who opens the file has Microsoft 365 or Excel 2021 and later. Use VLOOKUP or INDEX with MATCH when the file must work in older versions.

Do these formulas work in Google Sheets?

Most do. Functions that spill, such as TEXTSPLIT, differ between products, so check before sharing a file across both.

Practice instead of memorizing

Reading a pattern is not the same as writing it against messy data. Open a lesson, try the exercise, and use the hint to find the cell that went wrong.

Start learning Practice SUMIFS Browse all lessons

Using Excel for your job

Each career page lists the tasks that role does most and the lesson to start with: accounting, finance, sales, operations, data analysts and more.