Excel Formulas
Working, copy-ready solutions to real Excel tasks — each with a step-by-step explanation, an interactive demo you can try right here, and a free practice workbook.
These are formula recipes: how to actually do something — sum by month, look up across two criteria, count unique values. Looking for what a single function does instead? Browse the companion Excel Functions library (500+ guides). Every recipe below links to the function references it uses.
Lookup
Find a value by another value — across rows, columns, tiers, or multiple keys.
Case-Sensitive Lookup
All versionsDo a case-sensitive lookup with EXACT and INDEX/MATCH.
Get the First or Last Non-Blank Value
All versionsReturn the first or last non-blank value with the LOOKUP trick or XLOOKUP.
Get the Most Recent (Last) Match
Excel 365Return the most recent (last) match with XLOOKUP search_mode -1 or the LOOKUP trick.
Look Up and Return Multiple Columns
Excel 365Return several columns from one lookup that spills the whole record.
Look Up the Nth Match
Excel 365Return the 2nd, 3rd, or nth match with FILTER+INDEX or INDEX/SMALL.
Lookup with Multiple Criteria
Excel 365Look up a value on two or more keys at once by joining them inside XLOOKUP or INDEX/MATCH.
Partial-Match (Wildcard) Lookup
All versionsLook up on a fragment using wildcards with VLOOKUP or XLOOKUP.
Tax-Bracket / Tiered-Rate Lookup
Excel 365Land a number in the right tier or tax bracket with XLOOKUP match_mode -1 — no nested IFs.
Two-Way Lookup
Excel 365Pull the value where a row and a column meet, with nested XLOOKUP or INDEX/MATCH/MATCH.
Sum
Add things up by category, period, or condition.
Running Total (Cumulative Sum)
All versionsBuild a cumulative running total with one anchored, expanding-range SUM (or SCAN).
SUMIFS with Multiple Criteria
All versionsTotal a column on two or more conditions at once with SUMIFS (AND logic).
Sum Every Nth Row
All versionsAdd every Nth row with SUMPRODUCT and MOD on the row number.
Sum Only Visible (Filtered) Rows
All versionsSum only filtered/visible rows with SUBTOTAL (or AGGREGATE).
Sum by Month
Excel 365Total values that fall in a given month with SUMIFS and EOMONTH — year-safe, no helper column.
Sum by Quarter
All versionsTotal amounts for a quarter with SUMIFS and EOMONTH date boundaries.
Sum if Cell Contains Text
All versionsTotal rows whose label contains text using SUMIF with wildcards.
Sum the Same Cell Across Sheets (3D)
All versionsAdd the same cell across many sheets with a 3D reference.
Sum the Top N Values
All versionsTotal just the largest few values with LARGE and SUMPRODUCT — top 3, top 5, or N from a cell.
Two-Way Summary Table (Matrix Report)
All versionsBuild a region-by-month matrix report with one SUMIFS filled across and down.
Count
Count rows, distinct values, and matches.
COUNTIFS with Multiple Criteria
All versionsCount rows that meet several conditions at once with COUNTIFS.
Count Blank (Empty) Cells
All versionsCount empty cells in a range with COUNTBLANK.
Count Cells That Contain Text
All versionsCount cells containing a word or fragment with COUNTIF and wildcards.
Count Cells with Text (or Numbers)
All versionsCount text, numbers, non-blank or blank cells with the right COUNT function.
Count Dates Between Two Dates
All versionsCount dates that fall between two dates with COUNTIFS.
Count Dates by Day of Week
All versionsCount how many dates fall on a weekday with SUMPRODUCT and WEEKDAY.
Count Unique Values
Excel 365Count how many distinct entries are in a list — COUNTA(UNIQUE()) or the classic SUMPRODUCT trick.
Distinct Count by Group
Excel 365Count distinct values within each group with UNIQUE+FILTER or SUMPRODUCT.
Frequency Distribution (Histogram Bins)
All versionsGroup numbers into bands and count each with FREQUENCY or COUNTIFS.
Running Count of a Value
All versionsNumber each occurrence of a value with an expanding COUNTIF.
Average
Mean values by group, weighted, or filtered.
Average and Ignore Errors
Excel 2010+Average a column that contains errors with AGGREGATE option 6.
Average by Group
All versionsAverage the values in one category with AVERAGEIF / AVERAGEIFS.
Average the Top N Values
All versionsAverage only the best few values by nesting LARGE inside AVERAGE.
Moving Average
All versionsSmooth a series with a rolling AVERAGE window that slides down the column.
Weighted Average
All versionsWeight some values more than others with SUMPRODUCT divided by total weight.
Min & Max
Largest and smallest values, with or without conditions.
Cap (Clamp) a Value Between Limits
All versionsClamp a number between a floor and ceiling with nested MIN and MAX.
Find the Nth Largest (or Smallest) Value
All versionsGet the 2nd, 3rd, or nth largest/smallest value with LARGE and SMALL.
Maximum Value by Month
Excel 2019+Find the biggest value in a given month with MAXIFS and date boundaries.
Maximum Value with Criteria (MAXIFS)
Excel 2019+Find the largest value that meets a condition with MAXIFS.
Minimum Value with Criteria (MINIFS)
Excel 2019+Find the smallest value that meets a condition with MINIFS.
Logical
Decisions and tests — IF, IFS, and condition checks that label, grade, and flag.
Catch Errors with IFERROR
All versionsReplace #N/A and #DIV/0! errors with a clean fallback using IFERROR / IFNA.
Convert Scores to Grades (IF / IFS)
All versionsTurn scores into letter grades with IFS, nested IF, or a lookup table.
Flag Duplicate Values
All versionsMark or highlight repeated values with COUNTIF — labels and conditional formatting.
IF with AND / OR
All versionsMake an IF decision on several conditions at once by nesting AND or OR.
Map Values with SWITCH
Excel 2019+Map a value to a result with SWITCH instead of nested IFs.
Information
Test what's in a cell — text, errors, blanks, numbers.
Check if a Cell Contains Specific Text
All versionsTest whether a cell contains text with ISNUMBER and SEARCH.
Check if a Cell Has an Error
All versionsTest whether a formula errored with ISERROR or ISNA.
Check if a Cell is Blank
All versionsTest whether a cell is empty with ISBLANK inside IF.
Check if a Value is a Number or Text
All versionsTell real numbers from text-numbers with ISNUMBER and ISTEXT.
Text
Pull apart and reshape text — split, extract, clean, and join.
Capitalize Names (Proper Case)
All versionsCapitalize names with PROPER, or force case with UPPER and LOWER.
Clean Up Messy Text
All versionsStrip extra spaces, line breaks and non-breaking spaces with TRIM, CLEAN and SUBSTITUTE.
Count Words in a Cell
All versionsCount words in a cell by counting spaces with LEN and SUBSTITUTE.
Extract First & Last Name
Excel 365Pull first and last names out of a full-name cell with TEXTBEFORE/AFTER or LEFT/RIGHT.
Extract Numbers from Text
Excel 365Pull the number out of mixed text with TEXTAFTER/VALUE or MID/FIND.
Extract Text Between Two Characters
Excel 365Pull text between two characters with TEXTBEFORE/AFTER or MID/FIND.
Find and Replace Text in a Formula
All versionsSwap text inside a formula with SUBSTITUTE or REPLACE.
Join Text with a Delimiter
Excel 2019+Combine a range of cells into one delimited string with TEXTJOIN — skips blanks.
Pad Numbers with Leading Zeros
All versionsAdd leading zeros to numbers to a fixed width with TEXT.
Split Text into Columns
Excel 365Break one cell into columns on a delimiter with TEXTSPLIT (or LEFT/MID/FIND).
Date & Time
Work with dates: ages, durations, month boundaries.
Add Months (or Years) to a Date
All versionsShift a date by whole months or years with EDATE.
Calculate Age from a Birthdate
All versionsTurn a birthdate into an age in whole years with DATEDIF and TODAY — updates itself daily.
Calculate Time Between Two Times
All versionsCalculate hours between two times by subtracting and multiplying by 24.
Convert Text to a Real Date
All versionsTurn text dates into real dates with DATEVALUE or a DATE rebuild.
Days Until (or Since) a Date
All versionsCount days until or since a date with simple date subtraction and TODAY.
Find the Next Specific Weekday
All versionsJump to the next specific weekday from a date with WEEKDAY and MOD.
First & Last Day of the Month
All versionsGet the first or last day of any month with EOMONTH — leap-year safe.
Get the Day-of-Week Name from a Date
All versionsGet the day-of-week name from a date with TEXT (dddd / ddd).
Get the Quarter from a Date
All versionsTurn a date into its calendar quarter with MONTH and ROUNDUP.
Get the Week Number of a Date
All versionsGet the ISO or US week number of a date with ISOWEEKNUM / WEEKNUM.
Nth Weekday of a Month (e.g. 3rd Thursday)
All versionsFind the nth weekday of a month (3rd Thursday) with DATE and WEEKDAY.
Number of Days in a Month
All versionsFind how many days are in a month with EOMONTH and DAY (leap-safe).
Split Hours into Regular and Overtime
All versionsSplit daily hours into regular and overtime with MIN and MAX.
Working Days Between Two Dates
All versionsCount business days between dates, skipping weekends and holidays, with NETWORKDAYS.
Dynamic Arrays
Modern spilling formulas — FILTER, UNIQUE, SORT — that update themselves.
Aggregate an Array with REDUCE
Excel 365Aggregate an array to one value with REDUCE and LAMBDA.
Build Your Own Function with LAMBDA
Excel 365Build a reusable custom function with LAMBDA + Name Manager.
Build a calculated grid from row/column positions with MAKEARRAY.
Combine Ranges with VSTACK & HSTACK
Excel 365Append ranges into one with VSTACK and HSTACK.
Pull every record matching a condition into a report area with FILTER (or INDEX/SMALL).
Filter Data with a Formula
Excel 365Extract every row that meets a condition into a live, self-updating range with FILTER.
Flatten a grid into one column with TOCOL (or TOROW).
Spill a list of numbers, dates, or a grid with SEQUENCE.
Fold a list into a grid of any width with WRAPROWS / WRAPCOLS.
Running Totals & More with SCAN
Excel 365Make running totals, max, or product with SCAN and LAMBDA.
Sort a table by several keys with SORTBY (live formula).
Summarize each row or column with BYROW / BYCOL.
Transform Every Value with MAP
Excel 365Transform every value of an array with MAP and LAMBDA.
Unique Sorted List
Excel 365Turn a column with repeats into a clean, alphabetized list with SORT(UNIQUE()).
Rank
Order and position values — leaderboards, rankings, top performers.
Rank Values (No Gaps)
All versionsRank a list highest-to-lowest with RANK.EQ, including a no-gaps tiebreaker.
Percentage
Percent change, percent of total, and percentage math.
Percent Change & % of Total
All versionsCalculate percent change and percent of total — the right base and formatting.
Round
Round to decimals, multiples, or always up/down.
Always Round Up or Down
All versionsAlways round up or down with ROUNDUP, ROUNDDOWN, CEILING and FLOOR.
Round to Significant Digits
All versionsRound to N significant figures with ROUND and LOG10.
Round to the Nearest X
All versionsRound to decimal places with ROUND or to any multiple with MROUND.
Financial
Loans, savings, interest, and investment math.
CAGR (Compound Annual Growth Rate)
All versionsCompute the compound annual growth rate from a start and end value.
Calculate a Loan Payment (PMT)
All versionsCalculate a fixed loan payment from rate, term and amount with PMT.
Compound Interest
All versionsGrow a lump sum with the compound interest formula (1+rate)^periods.
Future Value of Savings (FV)
All versionsProject what regular savings grow to with FV and compound interest.
Net Present Value (NPV)
All versionsValue future cash flows in today's money with NPV (initial added outside).
Conditional Formatting
Formula-driven rules that highlight rows and cells automatically.
Banded (Alternating) Row Colors
All versionsAdd alternating row shading with ISEVEN(ROW()) — zebra stripes.
Color-Scale Heat Map
All versionsTurn numbers into a color-gradient heat map with Color Scales.
Highlight Rows with Missing Data
All versionsHighlight rows missing any data with COUNTBLANK in a CF rule.
Highlight Rows with a Formula
All versionsHighlight whole rows with a formula rule — the $C2 mixed-reference trick.
Highlight the Top N Values
All versionsShade the top N values with a LARGE-based conditional-formatting rule.
Data Validation
Drop-down lists and controlled data entry.
Create a Drop-Down List
All versionsBuild a drop-down list with Data Validation so entry is pick-from-a-menu.
Dependent (Cascading) Drop-Down List
All versionsMake a cascading drop-down where the second list depends on the first (INDIRECT).
Prevent Duplicate Entries
All versionsBlock duplicate entries with a COUNTIF data-validation rule.
Restrict Input to Whole Numbers (or a Range)
All versionsLimit a cell to whole numbers or a value range with Data Validation.
Statistics
Median, percentiles, spread, correlation, forecasting, and outliers.
Correlation Between Two Columns
All versionsMeasure how two columns move together with CORREL (-1 to +1).
Find Outliers (IQR Method)
All versionsFlag outliers with the IQR rule (QUARTILE) or a z-score test.
Forecast a Value with a Trend Line
All versionsProject a future value along a trend line with FORECAST or TREND.
Median by Group
Excel 365Find the median within a group with MEDIAN+FILTER or MEDIAN(IF()).
Percentile & Quartile
All versionsCompute percentiles and quartiles with PERCENTILE and QUARTILE.
Standard Deviation (Spread)
All versionsMeasure spread with STDEV.S (sample) or STDEV.P (population).
More recipes publishing regularly. We’re adding new formula recipes across text, logic, conditional formatting, ranking and percentages. Want one covered next? Tell us what you’re stuck on.
Learn the formulas that matter, in one day
Our hands-on Excel Formulas & Functions class turns these recipes into skills — live in Dallas–Fort Worth, Houston, Austin, Oklahoma City, Denver, or online.
See the Formulas & Functions Class