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.
Build Clickable Links with HYPERLINK
All versionsBuild clickable web, email, file, or in-workbook links with HYPERLINK.
Build References from Text with INDIRECT
All versionsTurn text into a live cell or sheet reference with INDIRECT.
Cascading (Two-Step) Lookups
All versionsChain two lookups: result of one feeds the next.
Case-Sensitive Lookup
All versionsDo a case-sensitive lookup with EXACT and INDEX/MATCH.
Create a Dynamic Named Range
All versionsMake a named range that auto-grows with OFFSET + COUNTA.
Find the Closest Numeric Match
All versionsFind the closest numeric value with INDEX/MATCH + MIN/ABS.
Find the Item with the Highest Value
All versionsReturn the label of the highest (or lowest) value.
Flip Rows and Columns with TRANSPOSE
All versionsFlip rows and columns with the live TRANSPOSE function.
Get the Column Letter from a Number
All versionsConvert a column number to its letter with ADDRESS + SUBSTITUTE.
Get the Current Sheet Name in a Cell
All versionsShow the current tab name in a cell with CELL and TEXTAFTER.
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.
Horizontal Lookup with HLOOKUP
All versionsLook up across a header row and return a value below with HLOOKUP.
List All Sheet Names in a Workbook
All versionsList every tab in the workbook with a GET.WORKBOOK named formula.
Look Up Across Several Sheets
All versionsLook up across several sheets by chaining IFERROR.
Look Up Many Values at Once (Spill)
365 / 2021Look up a whole column of values in one spilling formula.
Look Up a Value on Another Sheet
All versionsLook up data on another sheet, optionally chosen with INDIRECT.
Look Up a Value to the Left
All versionsLook up a value to the left with INDEX/MATCH.
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.
Lookup with Wildcards (Partial Match)
All versionsPartial-match lookup with * and ? wildcards.
Merge Two Tables (Add Columns by Key)
All versionsMerge two tables by a key (a formula join).
Partial-Match (Wildcard) Lookup
All versionsLook up on a fragment using wildcards with VLOOKUP or XLOOKUP.
Sum the Last N Rows with OFFSET
All versionsSum or average the last N rows with a moving OFFSET window.
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-Dimensional INDEX/MATCH/MATCH
All versionsLook up by row and column label with INDEX and two MATCHes.
Two-Way Approximate Lookup (Rate Grid)
All versionsLand in the right band on both axes of a rate grid with INDEX/MATCH.
Two-Way Lookup
Excel 365Pull the value where a row and a column meet, with nested XLOOKUP or INDEX/MATCH/MATCH.
Two-Way Lookup with Nested XLOOKUP
365 / 2021Two-way lookup with nested XLOOKUP (row x column).
Find the nearest tier with XLOOKUP match mode.
XLOOKUP with an 'If Not Found' Default
365 / 2021Return a default instead of #N/A with XLOOKUP.
XLOOKUP: Find the Last Match
365 / 2021Find the last (most recent) match with XLOOKUP search mode.
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).
Running Total That Resets Each Group
All versionsRunning total that resets for each group with SUMIFS.
SUMIF with Wildcards (Partial Match)
All versionsSum rows whose label contains a word with SUMIF wildcards.
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 Only Weekday (or Weekend) Amounts
All versionsSum amounts that fall on weekdays or weekends.
Sum a range that has errors using 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 Absolute Values
All versionsSum magnitudes ignoring sign with SUMPRODUCT + ABS.
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.
Sum with OR Conditions
All versionsSum where a field is one value OR another.
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 Distinct Values Meeting a Condition
All versionsCount distinct values that meet a condition.
Count Numbers, Text, and Blanks Separately
All versionsCount numbers, non-blanks, and blanks separately.
Count Rows Meeting Any of Several Conditions
All versionsCount rows matching any of several conditions.
Count Unique Values
Excel 365Count how many distinct entries are in a list — COUNTA(UNIQUE()) or the classic SUMPRODUCT trick.
Count Values Above the Average
All versionsCount values above (or below) the average.
Count Values Between Two Numbers
All versionsCount values between a low and high bound with COUNTIFS.
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 Excluding Zeros
All versionsAverage a range but skip exact zeros with AVERAGEIF and a <>0 criterion — blanks are already ignored.
Average Visible (Filtered) Rows Only
All versionsAverage only filtered, visible rows with SUBTOTAL code 101 — updates live as you change the filter.
Average and Ignore Errors
Excel 2010+Average a column that contains errors with AGGREGATE option 6.
Average by Day of Week
All versionsAverage values for a given day of week with SUMPRODUCT and WEEKDAY — no helper column needed.
Average by Group
All versionsAverage the values in one category with AVERAGEIF / AVERAGEIFS.
Average the Last N Values
All versionsAverage the most recent N values with OFFSET and COUNT (or TAKE in 365) — the window slides as data grows.
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.
Running (Cumulative) Average
All versionsBuild a cumulative running average with AVERAGE and an expanding range — the mean of everything so far.
Weighted Average
All versionsWeight some values more than others with SUMPRODUCT divided by total weight.
Weighted Moving Average
All versionsWeight recent points more with SUMPRODUCT — a responsive smoothed average divided by the weight total.
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.
Compare Numbers with a Tolerance
All versionsCompare numbers within a tolerance (floating point).
Convert Scores to Grades (IF / IFS)
All versionsTurn scores into letter grades with IFS, nested IF, or a lookup table.
Fill Blank Cells With the Value Above
All versionsFill blank cells with the value above using IF or Go To Special.
Flag Duplicate Values
All versionsMark or highlight repeated values with COUNTIF — labels and conditional formatting.
Flag Rows Meeting All Conditions (AND)
All versionsFlag rows meeting every condition with AND.
Grade or band values with the IFS function.
IF with AND / OR
All versionsMake an IF decision on several conditions at once by nesting AND or OR.
Catch only #N/A (not all errors) with IFNA.
IFS vs Nested IF: Which to Use
All versionsChoose between IFS, nested IF, and a lookup table.
Map Values with SWITCH
Excel 2019+Map a value to a result with SWITCH instead of nested IFs.
Show a Default When a Cell Is Blank
All versionsShow a default value when a cell is blank.
Turn TRUE/FALSE into 1/0
All versionsConvert TRUE/FALSE to 1/0 to count or sum.
Turn TRUE/FALSE into Yes/No (or ✓/✗)
All versionsTurn TRUE/FALSE into Yes/No, Pass/Fail, or tick/cross.
Information
Test what's in a cell — text, errors, blanks, numbers.
Check That All Required Cells Are Filled
All versionsCheck that all required cells are filled.
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.
Count Errors in a Range
All versionsCount how many cells hold errors with SUMPRODUCT and ISERROR — audit a sheet in one formula.
Detect which cells contain formulas with ISFORMULA — audit a model or flag overwritten cells.
Do Different Things for Text vs Numbers
All versionsBranch on text vs numbers with ISNUMBER/ISTEXT.
Identify a Value's Type with TYPE
All versionsIdentify whether a value is a number, text, logical, or error with TYPE — branch logic on the kind.
Read Cell Properties with CELL
All versionsRead a cell's address, column, type or filename with the CELL function — metadata for dynamic labels.
Test for Even or Odd with ISEVEN / ISODD
All versionsTest whether a number is even or odd.
Try Several Lookups with an IFERROR Chain
All versionsTry several lookups in turn with nested IFERROR — the first hit wins, with a clean message if all miss.
Turn #N/A into Zero or Blank
All versionsTurn #N/A into 0, blank, or a message with IFNA — without hiding genuine errors like IFERROR does.
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.
Convert Text That Looks Like Numbers
All versionsTurn numbers stored as text into real numbers with VALUE.
Convert Text That Looks Like a Number
All versionsConvert numbers stored as text back to real numbers with VALUE or a math nudge (*1, --) so they sum.
Count Characters Without Spaces
All versionsCount characters excluding spaces with LEN + SUBSTITUTE.
Count How Many Times a Word Appears
All versionsCount how many times a word appears in a cell.
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.
Extract Text Inside Parentheses
All versionsExtract text between parentheses with MID + FIND.
Extract the Domain from an Email
All versionsPull the domain (after @) from an email with TEXTAFTER or MID/FIND.
Extract the First Word
All versionsPull the first word from a cell with LEFT + FIND.
Extract the Last Word
All versionsPull the last word with the TRIM/RIGHT/REPT trick.
Extract the Nth Word from Text
All versionsPull the nth word from a phrase with the SUBSTITUTE/REPT/MID trick.
Extract the Value After a Label
All versionsGet the value after a label like Name: with SEARCH.
Find & Replace Several Things at Once
All versionsFind and replace several things at once with nested SUBSTITUTE.
Find and Replace Text in a Formula
All versionsSwap text inside a formula with SUBSTITUTE or REPLACE.
Find the Nth Occurrence of a Character
All versionsFind the position of the nth occurrence of a character with FIND/SUBSTITUTE.
Find the Position of Text in a Cell
All versionsFind where text appears in a cell with SEARCH/FIND.
Get Initials from a Name
All versionsBuild initials from a name with LEFT/MID or TEXTSPLIT.
In-Cell Bar Charts with REPT
All versionsDraw in-cell bar charts, stars, and progress bars with REPT.
Insert Special Characters with CHAR & CODE
All versionsInsert special characters and inspect codes with CHAR, CODE and UNICHAR.
Join Text with a Delimiter
Excel 2019+Combine a range of cells into one delimited string with TEXTJOIN — skips blanks.
Join an Entire Range of Cells
Excel 2019+Join an entire range of cells with TEXTJOIN or CONCAT.
Mask Sensitive Data (Show Last 4)
All versionsHide all but the last few characters with REPT and RIGHT.
Number to Ordinal (1st, 2nd, 3rd)
All versionsTurn 1 into 1st, 22 into 22nd, 13 into 13th.
Pad Numbers with Leading Zeros
All versionsAdd leading zeros to numbers to a fixed width with TEXT.
Proper Case That Handles Exceptions
All versionsFix PROPER's mistakes (McDonald, IBM) with SUBSTITUTE patches.
Remove Extra & Hidden Spaces (TRIM + CLEAN)
All versionsScrub extra and hidden spaces from imported text with TRIM + CLEAN.
Remove Line Breaks From Cells
All versionsFlatten in-cell line breaks to spaces with SUBSTITUTE + CHAR(10).
Remove Line Breaks from Text
All versionsFlatten in-cell line breaks to spaces with SUBSTITUTE + CHAR(10).
Remove Numbers from Text (Keep Letters)
365 (2024+)Strip digits from text, keeping letters, with REGEXREPLACE.
Remove Specific Characters from Text
All versionsStrip unwanted characters with nested SUBSTITUTE (or keep only digits).
Reverse the Characters in a Cell
Excel 365Reverse the characters in a string with TEXTJOIN, MID and SEQUENCE.
Sentence Case (Capitalize First Letter Only)
All versionsCapitalize only the first letter (sentence case).
Split Letters from Numbers (ABC123)
365 (2024+)Split letters from numbers in a code like ABC123.
Split Text into Columns
Excel 365Break one cell into columns on a delimiter with TEXTSPLIT (or LEFT/MID/FIND).
Split a Delimited List into Rows
Excel 365Split a delimited cell into rows (down a column) with TEXTSPLIT.
Standardize Phone Number Formatting
All versionsNormalize messy phone numbers to one format with TEXT.
Swap "Last, First" to "First Last"
All versionsConvert Last, First into First Last and back.
Date & Time
Work with dates: ages, durations, month boundaries.
Add Business Days to a Date
All versionsAdd (or subtract) working days to a date with WORKDAY.
Add Months (or Years) to a Date
All versionsShift a date by whole months or years with EDATE.
Age (or Duration) in Weeks and Months
All versionsExpress an age or duration in weeks or total months.
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 Seconds to h:mm:ss
All versionsConvert raw seconds into a readable h:mm:ss duration with TEXT.
Convert Text to a Real Date
All versionsTurn text dates into real dates with DATEVALUE or a DATE rebuild.
Convert a Time to Decimal Hours
All versionsConvert a time like 8:30 to 8.5 decimal hours.
Count Working Days (Excluding Holidays)
All versionsCount working days between dates, skipping weekends and holidays, with NETWORKDAYS.
Count a Weekday in a Month
All versionsCount how many Mondays (etc.) are in a month.
Countdown to a Date & Time
All versionsShow days, hours, and minutes remaining to a target with NOW.
Day Count with DAYS360 (30/360 Basis)
All versionsCount days on the 30/360 basis used in bond and accounting math with DAYS360.
Days Until (or Since) a Date
All versionsCount days until or since a date with simple date subtraction and TODAY.
Days in a Year (Leap-Aware)
All versionsCompute days in a year, leap-aware (365 or 366).
Exact Age in Years, Months & Days
All versionsBreak an age into exact years, months, and days with DATEDIF.
Find the Next Specific Weekday
All versionsJump to the next specific weekday from a date with WEEKDAY and MOD.
First & Last Day of a Quarter
All versionsFind the first or last day of a date's quarter.
First & Last Day of the Month
All versionsGet the first or last day of any month with EOMONTH — leap-year safe.
Fiscal Year & Quarter from a Date
All versionsMap any date to its fiscal year and quarter for non-January calendars.
Get a Date from Year & Week Number
All versionsGet the calendar date that a given year and week number starts on.
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.
Hours for a Shift That Crosses Midnight
All versionsTotal hours for a shift that crosses midnight with MOD.
Last Business Day of the Month
All versionsFind the last (or first) business day of any month with WORKDAY + EOMONTH.
Month Name from a Number (or Date)
All versionsTurn a month number into its name (June from 6).
Months Between Two Dates
All versionsCount whole or calendar months between two dates.
Next Anniversary or Renewal Date
All versionsFind the next anniversary, birthday, or renewal date with DATE.
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).
Overlapping Days Between Two Date Ranges
All versionsCount overlapping days between two date ranges with MIN/MAX.
Round Time to the Nearest 15 Minutes
All versionsRound time to the nearest 15 minutes (or any interval) with MROUND.
Same Date Last Year (and Period Comparisons)
All versionsShift a date back a year for YoY comparisons with EDATE.
Split Hours into Regular and Overtime
All versionsSplit daily hours into regular and overtime with MIN and MAX.
Sum Time Past 24 Hours ([h]:mm)
All versionsTotal hours past 24 using the [h]:mm format instead of letting them wrap.
Which Week of the Month Is It?
All versionsFind which week of the month a date falls in.
Working Days Between Two Dates
All versionsCount business days between dates, skipping weekends and holidays, with NETWORKDAYS.
Working Days Remaining to a Deadline
All versionsCount working days left until a deadline 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.
Cross-Tabs with PIVOTBY
365 (2024+)Make a live cross-tab with PIVOTBY.
Pull every record matching a condition into a report area with FILTER (or INDEX/SMALL).
FILTER with AND / OR Conditions
365 / 2021Filter rows on AND / OR conditions with FILTER.
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.
Pick and reorder rows or columns with CHOOSEROWS/CHOOSECOLS.
Fold a list into a grid of any width with WRAPROWS / WRAPCOLS.
Return a Whole Row with XLOOKUP
365 / 2021Return a whole row of fields with one XLOOKUP.
Running Totals & More with SCAN
Excel 365Make running totals, max, or product with SCAN and LAMBDA.
Share of Total with PERCENTOF
365 (2024+)Show each value as a share of total with PERCENTOF.
Sort a table by several keys with SORTBY (live formula).
Sort by a helper column or custom order with SORTBY.
Split a cell into columns (or a grid) with TEXTSPLIT.
Grab text before or after a delimiter with TEXTBEFORE/TEXTAFTER.
Summarize each row or column with BYROW / BYCOL.
Summarize with GROUPBY
365 (2024+)Build a grouped summary in one formula with GROUPBY.
Transform Every Value with MAP
Excel 365Transform every value of an array with MAP and LAMBDA.
Keep or remove the first/last rows with TAKE and DROP.
Unique List with Counts
365 / 2021Build a distinct list with counts (UNIQUE + COUNTIF).
Unique Sorted List
Excel 365Turn a column with repeats into a clean, alphabetized list with SORT(UNIQUE()).
Math
Number crunching — SUMPRODUCT, MOD, roots, bases, units, combinatorics, and random.
Combinations & Permutations
All versionsCount selections and arrangements with COMBIN, PERMUT and FACT.
Convert Between Binary, Hex & Decimal
All versionsConvert between decimal, binary, hex and octal with DEC2BIN/HEX2DEC.
Convert Units with CONVERT
All versionsConvert miles, kg, Celsius, hours and more with the CONVERT function.
Cycle Through a List with MOD
All versionsCycle through a list repeatedly with MOD — round-robin assignment, alternating bands, repeating schedules.
Distance Between Two Points (Euclidean)
All versionsStraight-line distance between two points with SQRT and SUMSQ — the Pythagorean theorem in 2D or 3D.
Factorial and Combinatorics with FACT
All versionsCompute n! and build permutations and combinations with FACT, COMBIN and PERMUT.
Generate Random Numbers & Picks
All versionsGenerate random numbers and random picks with RANDBETWEEN and RAND.
Greatest Common Divisor & Least Common Multiple
All versionsFind the greatest common divisor and least common multiple, and simplify ratios.
INT vs TRUNC (Whole Numbers)
All versionsINT vs TRUNC: both drop decimals, but they differ on negatives — chop toward zero vs round down.
Logarithms: LOG, LN, and LOG10
All versionsTake logs in any base with LOG, LN and LOG10 — for growth rates, decibels, pH and doubling time.
Multiply a Whole Range with PRODUCT
All versionsMultiply every value in a range with PRODUCT (compound factors).
Multiply and Add with SUMPRODUCT
All versionsMultiply arrays and add, or count/sum on multiple conditions, with SUMPRODUCT.
Powers, Roots & Exponentials (POWER, SQRT, EXP)
All versionsRaise to a power, take any root, or compute e^x with POWER, SQRT and EXP.
Powers, Square Roots & Nth Roots
All versionsRaise to powers and take square or nth roots with POWER, ^ and SQRT.
Random Decimal in a Range (RAND)
All versionsGenerate a random decimal in any range with RAND — scaled and shifted for simulations and test data.
Shuffle a list or sample without duplicates using SORTBY + RANDARRAY.
Remainders & Cycles with MOD
All versionsGet remainders and build cycles, odd/even tests and wraps with MOD.
Roman Numerals (ROMAN & ARABIC)
All versionsConvert numbers to Roman numerals and back with ROMAN and ARABIC.
Running (Cumulative) Product
All versionsBuild a cumulative product with PRODUCT and an expanding range — compound growth factors and indices.
Split a Number into Whole Units and Remainder
All versionsSplit a total into whole groups and a remainder with QUOTIENT and MOD.
Sum of Squares with SUMSQ
All versionsSquare every value and total them in one function with SUMSQ — the basis of variance, distance and least-squares.
Trigonometry: SIN, COS, TAN (with Degrees)
All versionsUse SIN, COS and TAN with degrees by wrapping angles in RADIANS — heights, distances and angles.
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.
Cumulative Percent of Total (Pareto)
All versionsBuild a running cumulative percent (Pareto).
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 Half Down (Round 0.5 Toward Zero)
All versionsRound halves down (2.5 to 2) instead of away from zero with a ROUNDUP minus-0.5 trick.
Round Up/Down to a Multiple (CEILING & FLOOR)
All versionsRound up or down to the nearest multiple — to the next $5 or down to 100 — with CEILING, FLOOR and MROUND.
Round a Percentage Cleanly
All versionsRound a percentage cleanly by rounding the underlying decimal — 2 places for whole percent, 3 for one decimal.
Round to Cents and Currency Units
All versionsRound money cleanly to cents, nickels or whole dollars with ROUND and MROUND — fix floating-point pennies.
Round to Even or Odd (EVEN & ODD)
All versionsRound up to the next even or odd integer with EVEN and ODD — for pairs, panels and centered counts.
Round to Significant Digits
All versionsRound to N significant figures with ROUND and LOG10.
Round to Thousands or Millions
All versionsRound to the nearest thousand or million with ROUND and negative digits — cleaner dashboard figures.
Round to the Nearest Half (0.5)
All versionsRound to the nearest 0.5 (or quarter, dime) with MROUND, CEILING and FLOOR — for half-step pricing.
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.
Annuity Payout from a Lump Sum
All versionsTurn a lump sum into a level monthly payout.
Balloon Payment (Remaining Balance)
All versionsFind the lump-sum balloon owed at loan maturity.
Break-Even Point
All versionsFind the units needed to cover costs (fixed / contribution margin).
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.
Credit Card Payoff Time (NPER)
All versionsFind how long a card balance takes to clear with NPER.
Depreciation: SLN, DDB & SYD
All versionsDepreciate an asset with SLN, DDB, or SYD (straight-line vs accelerated).
Discounted Cash Flow (DCF) Value
All versionsValue future cash flows today with a DCF (NPV).
Dividend Yield and Income
All versionsCompute dividend yield and annual income.
Doubling Time & the Rule of 72
All versionsEstimate doubling time with the Rule of 72 and compute it exactly with NPER.
Effective vs Nominal Interest Rate
All versionsConvert nominal to effective annual rate (APR to APY) with EFFECT/NOMINAL.
Full Mortgage Payment (PITI)
All versionsCompute the full PITI mortgage payment with taxes & insurance.
Future Value of Savings (FV)
All versionsProject what regular savings grow to with FV and compound interest.
How Fast a Loan Pays Off (NPER)
All versionsSee how extra payments shorten a loan with NPER.
Interest-Only Payment
All versionsFind an interest-only loan payment.
Internal Rate of Return (IRR)
All versionsFind an investment's annual return where NPV is zero with IRR.
Loan Amortization Schedule (PPMT & IPMT)
All versionsSplit each loan payment into interest and principal with IPMT and PPMT.
Monthly Savings to Reach a Goal (PMT)
All versionsFind the monthly deposit to reach a savings goal with PMT.
Net Present Value (NPV)
All versionsValue future cash flows in today's money with NPV (initial added outside).
Present Value of Future Money (PV)
All versionsFind what future money or payments are worth today with PV.
Price a Bond (Present Value of Cash Flows)
All versionsPrice a bond as the present value of its cash flows.
Profit Margin vs Markup
All versionsTell profit margin from markup, and price for a target margin.
ROI & Payback Period
All versionsCompute return on investment and payback period.
Real (Inflation-Adjusted) Return
All versionsAdjust a return for inflation (Fisher equation).
Sinking Fund: Save to a Target
All versionsFind the deposit to reach a target by a future date.
Value of a Perpetuity
All versionsValue a payment that lasts forever (C/r).
XIRR for Irregular Cash-Flow Dates
All versionsCalculate annualized return on irregular cash-flow dates with XIRR.
Yield to Maturity with RATE
All versionsFind a bond's yield to maturity with RATE.
Business
Everyday business math — invoices, commissions, budgets, pricing, payroll, inventory, and cash flow.
Age Receivables into 30/60/90 Buckets
All versionsAge unpaid invoices into 30/60/90-day buckets.
Allocate a Shared Cost by Weight
All versionsAllocate a shared cost across departments by weight.
Annualize a Year-to-Date Figure (Run-Rate)
All versionsAnnualize a year-to-date figure into a full-year run-rate.
Apply Discount, Then Tax (Order Matters)
All versionsApply a discount then tax in the right order.
Back Out Tax from a Tax-Inclusive Price
All versionsBack out the tax from a tax-inclusive price.
Bill Hours at Different Rates
All versionsBill hours at different rates with SUMPRODUCT.
Budget vs Actual Variance
All versionsCompute budget vs actual variance in dollars and percent.
Compare Two Loans Side by Side
All versionsCompare two loans by payment and total interest with PMT.
Contribution Margin & Ratio
All versionsFind contribution margin per unit and as a ratio.
Convert Currency with a Rate Table
All versionsConvert currency with a maintained exchange-rate table.
Cost Per Unit (Fixed + Variable)
All versionsSpread fixed plus variable costs into a per-unit cost.
Gross-to-Net Pay Calculator
All versionsTake gross pay down to net with stacked deductions.
Inventory Reorder Flag & Quantity
All versionsFlag low stock and compute how much to reorder.
Invoice Total with Tax (Line Items)
All versionsTotal an invoice's line items and tax with SUMPRODUCT.
Lease vs Buy Comparison
All versionsCompare the net cost of leasing versus buying.
Look Up Sales Tax by Region
All versionsLook up the right sales-tax rate by region with VLOOKUP.
Markup Chain: Cost to Wholesale to Retail
All versionsChain cost-to-wholesale-to-retail markups correctly.
Payback Period from Cash Flows
All versionsFind the payback period from a cash-flow stream.
Profit by Product with SUMIFS
All versionsRoll a sales log into profit by product with SUMIFS.
Rolling 12-Month Total
All versionsSum a trailing 12-month (TTM) window that slides forward.
Running Cash Balance (Money In/Out)
All versionsKeep a running cash balance as money comes in and out.
Tiered Sales Commission
All versionsPay a sales commission that steps up by tier with VLOOKUP.
Tip & Split the Bill
All versionsAdd a tip and split a bill among people.
Volume / Quantity Discount Pricing
All versionsApply volume/quantity discount pricing with a break table.
Charts
Visualize data — sparklines, dynamic charts, KPI cards, gauges, and dashboard techniques.
Add tiny in-cell line, column, or win/loss sparkline charts.
Auto-Expanding Chart Source
All versionsMake a chart auto-expand with new data (Table or OFFSET).
Build a KPI Card with Delta
All versionsBuild a KPI card with a value and up/down delta.
Bullet Chart (Actual vs Target)
All versionsBuild a bullet chart (actual vs target vs bands).
Combine columns and a line on two axes.
Put custom text labels on chart points from cells.
Goal Thermometer Chart
All versionsMake a goal thermometer that fills toward a target.
Histogram with FREQUENCY
All versionsBuild a histogram by binning with FREQUENCY.
Link a Chart Title to a Cell
All versionsLink a chart title to a cell so it updates itself.
Percent-of-Goal Progress Gauge
All versionsDraw a percent-of-goal progress bar with REPT.
Waterfall Chart with Helper Columns
All versionsBuild a waterfall (bridge) chart with helper columns.
Show streaks with a direction-only win/loss sparkline.
Analysis
What-if tools — PivotTables, Goal Seek, data tables, scenarios, and sensitivity analysis.
Add a Calculated Field to a PivotTable
All versionsAdd a calculated field (like margin %) inside a PivotTable.
Compare Best/Base/Worst Scenarios
All versionsCompare best/base/worst scenarios with a selector and CHOOSE.
Find Break-Even with Goal Seek
All versionsFind break-even by driving profit to zero with Goal Seek.
Goal Seek: Solve for an Input
All versionsSolve backward for the input that hits a target with Goal Seek.
Group a PivotTable by Month or Quarter
All versionsGroup PivotTable dates into months, quarters, or years.
Loan Payment Sensitivity to Rate
All versionsSee how a loan payment moves as the rate changes.
One-Variable Data Table (Sensitivity)
All versionsSweep one input across a range with a data table.
Product-Mix What-If with SUMPRODUCT
All versionsModel total profit from a product mix with SUMPRODUCT.
Pull a Value from a PivotTable (GETPIVOTDATA)
All versionsPull a PivotTable value by field name with GETPIVOTDATA.
Show PivotTable Values as % of Total
All versionsShow PivotTable values as a percent of the total.
Solve the Price for a Target Profit
All versionsSolve the price needed to hit a profit target.
Two-Variable Data Table (Grid)
All versionsBuild a result grid varying two inputs at once.
Statistics
Median, percentiles, spread, correlation, forecasting, and outliers.
Coefficient of Variation (Relative Spread)
All versionsCompare relative spread across datasets with STDEV / AVERAGE.
Confidence Interval for a Mean
All versionsPut a margin of error around a sample mean with CONFIDENCE.
Correlation Between Two Columns
All versionsMeasure how two columns move together with CORREL (-1 to +1).
Covariance Between Two Variables
All versionsMeasure whether two variables move together with COVAR.
Find Outliers (IQR Method)
All versionsFlag outliers with the IQR rule (QUARTILE) or a z-score test.
Forecast Future Values with TREND
365 / 2021Project future values along a trend with TREND.
Forecast a Value with a Trend Line
All versionsProject a future value along a trend line with FORECAST or TREND.
Geometric Mean (Average Growth Rate)
All versionsAverage compounding growth rates correctly with GEOMEAN.
Harmonic Mean (Rates & Ratios)
All versionsAverage rates and ratios correctly with HARMEAN.
Mean Absolute Deviation (AVEDEV)
All versionsMeasure average spread with AVEDEV — the mean absolute distance from the average, robust to outliers.
Mean vs Median vs Mode
All versionsCompare mean, median, and mode for the center.
Median by Group
Excel 365Find the median within a group with MEDIAN+FILTER or MEDIAN(IF()).
Most Frequent Value (MODE)
All versionsFind the most frequent value (number or text) with MODE.
Normalize Values to a 0–1 Scale
All versionsRescale values to a 0-1 scale (min-max).
Percentile & Quartile
All versionsCompute percentiles and quartiles with PERCENTILE and QUARTILE.
Percentile Rank of a Value (PERCENTRANK)
All versionsFind a value's percentile standing within a dataset with PERCENTRANK.
R-Squared: How Well a Line Fits
All versionsMeasure how well a line fits with R-squared (RSQ).
Range and Interquartile Range (IQR)
All versionsMeasure spread with the range and interquartile range.
Rank Values Within Each Group
All versionsRank values within each group with COUNTIFS.
Regression Line: SLOPE & INTERCEPT
All versionsGet a regression line's slope and intercept.
Rolling Standard Deviation (Volatility)
All versionsTrack changing volatility with a rolling standard deviation.
Skewness and Kurtosis
All versionsDescribe distribution shape with SKEW and KURT.
Standard Deviation (Spread)
All versionsMeasure spread with STDEV.S (sample) or STDEV.P (population).
Standard Error of the Mean
All versionsFind how precise a sample mean is (standard error).
Trimmed Mean (Average Without Extremes)
All versionsAverage after dropping the extreme high and low values with TRIMMEAN.
Variance (VAR.S vs VAR.P)
All versionsCompute sample or population variance (VAR.S/.P).
Z-Scores: How Far From Average
All versionsMeasure how many standard deviations a value is from the mean.
Advanced
Power-user formula craft — LET, LAMBDA, REGEX, and custom number formats.
Clean Text with REGEXREPLACE
365 (2024+)Clean and reformat text by pattern with REGEXREPLACE.
Conditional Number Formats
All versionsColor or change format by value with bracketed conditions.
Custom Number Format Codes
All versionsControl how numbers display with custom format codes.
Display Numbers in K / Millions
All versionsDisplay big numbers as K or millions with a format code.
Extract Text with REGEXEXTRACT
365 (2024+)Extract text by pattern with REGEXEXTRACT.
Format Phone / ID Numbers Without Changing Them
All versionsFormat phone or ID numbers without changing the value.
Hide Zeros (or Show a Dash)
All versionsHide zeros or show a dash with a number format.
LAMBDA + LET: A Clean Custom Function
365 / 2021Build a clean custom function with LAMBDA + LET.
LET: Name Values Inside a Formula
365 / 2021Name values inside a formula for clarity and speed with LET.
Recursive LAMBDA
365 / 2021Write a LAMBDA that calls itself to loop without VBA.
Save a LAMBDA as a Reusable Function
365 / 2021Save a LAMBDA as a reusable custom function in Name Manager.
Validate Text with REGEXTEST
365 (2024+)Validate text format with REGEXTEST (TRUE/FALSE).
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.
Build a Gantt Chart with Conditional Formatting
All versionsBuild a live Gantt chart from start/end dates with a CF formula.
Color-Scale Heat Map
All versionsTurn numbers into a color-gradient heat map with Color Scales.
Highlight Cells Above (or Below) Average
All versionsHighlight cells above or below the group average automatically.
Highlight Cells Above a Reference Value
All versionsHighlight values above a threshold from a cell.
Highlight Cells Containing Specific Text
All versionsHighlight cells that mention a keyword with ISNUMBER + SEARCH.
Highlight Cells That Contain Errors
All versionsLight up every cell that evaluates to an error with ISERROR.
Highlight Cells by Text Length
All versionsFlag cells that are the wrong length with LEN.
Highlight Differences Between Two Columns
All versionsHighlight where two columns differ.
Highlight Due & Overdue Dates
All versionsTurn overdue dates red and upcoming ones amber with TODAY.
Highlight Duplicate Values
All versionsShade every value that appears more than once with a COUNTIF rule.
Highlight Every Nth Row
All versionsShade every Nth row with a MOD rule.
Highlight Future (or Past) Dates
All versionsHighlight future (or past) dates vs TODAY.
Highlight Missing Required Entries
All versionsFlag missing required entries with a blank rule.
Highlight Only the Unique Values
All versionsHighlight values that appear exactly once.
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 Values Not in an Allowed List
All versionsFlag entries not on an allowed list with COUNTIF.
Highlight Weekends in a Date List
All versionsShade Saturdays and Sundays in a date list with WEEKDAY.
Highlight Where a Group Changes
All versionsDraw a line where a sorted group changes.
Highlight an Entire Row Based on One Cell
All versionsLight up a whole row based on one cell using a mixed reference.
Highlight the Highest and Lowest Values
All versionsFlag the highest and lowest values with MAX/MIN rules.
Highlight the Top 10% by Value
All versionsHighlight the top 10% by value with PERCENTILE.
Highlight the Top N Values
All versionsShade the top N values with a LARGE-based conditional-formatting rule.
In-Cell Data Bars
All versionsTurn a column of numbers into in-cell data bars.
Shade Alternating Groups (Not Just Rows)
All versionsBand by group, not just every other row, with a group counter.
Strike Through Completed Tasks
All versionsStrike through tasks marked done with a CF rule.
Traffic-Light Icon Sets
All versionsAdd traffic-light icons with your own number thresholds.
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).
Flag Invalid Email Addresses
All versionsFlag malformed email addresses with an ISNUMBER + SEARCH check.
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.
Restrict Text Length on Entry
All versionsBlock entries that are too long or short with text-length validation.
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