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.
| Task | Pattern | Practice | Worth knowing |
|---|---|---|---|
| Add up a column | =SUM(B2:B20) | SUM | Totals a range and ignores text. |
| Add up rows that meet one condition | =SUMIF(A2:A20,"East",C2:C20) | SUMIF | The 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") | SUMIFS | Here the range to add comes first. |
| Multiply pairs, then add | =SUMPRODUCT(B2:B20,C2:C20) | SUMPRODUCT | Quantity times price without a helper column. |
| Count cells that hold numbers | =COUNT(B2:B20) | COUNT | Counts numeric cells only. |
| Count anything that is not empty | =COUNTA(A2:A20) | COUNTA | Counts text and numbers. |
| Count blanks in a column | =COUNTBLANK(A2:A20) | COUNTBLANK | Handy for finding missing entries. |
| Count rows that meet one condition | =COUNTIF(A2:A20,"East") | COUNTIF | One range, one test. |
| Count rows that meet two or more conditions | =COUNTIFS(A2:A20,"East",C2:C20,">2000") | COUNTIFS | Every pair of range and test must hold. |
| Average a range | =AVERAGE(B2:B20) | AVERAGE | Plain mean of the numbers. |
| Average rows that meet a condition | =AVERAGEIFS(C2:C20,A2:A20,"East") | AVERAGEIF, AVERAGEIFS | Average of only the matching rows. |
| Find the typical value when a few are extreme | =MEDIAN(B2:B20) | MEDIAN | Less distorted by outliers than the mean. |
| Average with different weights | =SUMPRODUCT(B2:B6,C2:C6)/SUM(C2:C6) | Weighted average | Scores, prices and quantities. |
| Look up a value by key | =XLOOKUP(E2,A2:A20,C2:C20,"Not found") | XLOOKUP | Needs Microsoft 365 or Excel 2021 and later. |
| Look up in older Excel | =VLOOKUP(E2,A2:C20,3,FALSE) | VLOOKUP | The 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, MATCH | Works in every modern version. |
| Show a fallback when a formula errors | =IFERROR(B2/C2,0) | IFERROR | Use it for expected errors, not to hide bad data. |
| Return one of two results | =IF(B2>=100,"Pass","Review") | IF | A single test with two outcomes. |
| Choose between several outcomes | =IFS(B2>=90,"A",B2>=80,"B",TRUE,"C") | IFS, SWITCH | List the tests in order; add a final TRUE as the default. |
| Split text at a separator | =TEXTSPLIT(A2,",") | TEXTSPLIT, TEXTBEFORE, TEXTAFTER | Spills across cells; needs Microsoft 365 or Excel 2021 and later. |
| Take part of a text by position | =LEFT(A2,3) | LEFT, RIGHT, MID, FIND | LEFT, RIGHT and MID, with FIND to locate a character. |
| Replace or tidy text | =SUBSTITUTE(A2,"-","") | SUBSTITUTE, PROPER | SUBSTITUTE swaps text; PROPER fixes capitalization. |
| Join text from several cells | =TEXTJOIN(", ",TRUE,A2:A6) | TEXTJOIN, CONCAT | TEXTJOIN adds a separator and can skip blanks. |
| Build or take apart a date | =DATE(2026,11,8) | DATE, YEAR, MONTH, DAY | Keep dates as real dates, not text. |
| Count days between two dates | =DAYS(B2,A2) | DAYS | End date first, then start date. |
| Round up to a multiple | =CEILING(B2,5) | CEILING, ROUNDUP | Pack sizes, price steps and billing blocks. |
| Percentage change | =(C2-B2)/B2 | Percentage growth, Actual versus target | Format the result as a percentage. |
| Share of a total | =B2/SUM($B$2:$B$20) | Share of total, Absolute references | The 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 lessonsUsing 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.