Excel Formula Reference
Excel Formulas Cheat Sheet: 100+ Formulas & Examples
Master the most useful Excel formulas with clear syntax, practical examples, and quick explanations. From basic calculations and IF statements to XLOOKUP, SUMIFS, text functions, dates, and dynamic arrays.
Formula Finder
Find an Excel Formula
Search formulas, functions, examples, and common Excel tasks throughout this cheat sheet.
Quick Reference
Excel Formula Quick Reference
Quickly find the Excel function you need. Use this table to compare common functions, understand their purpose, and copy practical formulas directly into your workbook.
| Function | Purpose | Example | Copy |
|---|---|---|---|
| SUM | Add values together | =SUM(B2:B10) |
|
| AVERAGE | Calculate the arithmetic mean | =AVERAGE(B2:B10) |
|
| COUNT | Count cells containing numbers | =COUNT(B2:B100) |
|
| IF | Return different results based on a condition | =IF(C2>=70,"Pass","Fail") |
|
| COUNTIFS | Count rows matching multiple criteria | =COUNTIFS(B:B,"East",C:C,">100") |
|
| VLOOKUP | Look up a value vertically in a table | =VLOOKUP(A2,D2:F100,3,FALSE) |
|
| INDEX + MATCH | Perform a flexible lookup | =INDEX(C:C,MATCH(A2,B:B,0)) |
|
| TEXTJOIN | Combine text using a delimiter | =TEXTJOIN(", ",TRUE,A2:A5) |
|
| TODAY | Return the current date | =TODAY() |
|
| EOMONTH | Return the last day of a month | =EOMONTH(A2,0) |
|
| FILTER | Return rows that meet specified criteria | =FILTER(A2:C100,C2:C100>100) |
|
| IFERROR | Replace formula errors with another result | =IFERROR(A2/B2,0) |
Formula Basics
Excel Formula Basics
Every Excel formula starts with an equals sign. From there, you can combine cell references, numbers, operators, and functions to calculate or return results.
Start a Formula
Type an equals sign followed by your calculation or function.
=A2+B2
=SUM(B2:B10)
Formula Building Blocks
| Element | Example |
|---|---|
| Cell reference | A2 |
| Range | A2:A20 |
| Number | 100 |
| Text | "Complete" |
| Function | SUM() |
Arithmetic Operators
| Operator | Meaning | Example | Result |
|---|---|---|---|
+ |
Addition | =10+5 |
15 |
- |
Subtraction | =10-5 |
5 |
* |
Multiplication | =10*5 |
50 |
/ |
Division | =10/5 |
2 |
^ |
Exponentiation | =2^3 |
8 |
% |
Percentage | =200*10% |
20 |
Order of Operations
=10+5*2
20
=(10+5)*2
30
Excel follows the standard order of operations: parentheses first, followed by exponents, multiplication and division, then addition and subtraction.
Cell References
Excel Cell References
Cell references control which cells a formula uses. Understanding relative, absolute, and mixed references is essential when copying formulas across rows and columns.
A1
Changes automatically when the formula is copied to another cell.
=A2*B2
Copying the formula down one row changes it to
=A3*B3.
$A$1
Locks both the column and row so the reference never changes when copied.
=B2*$E$1
Useful for tax rates, exchange rates, constants, and fixed lookup cells.
$A1 / A$1
Locks only the column or only the row while allowing the other part to change.
=$A2*B$1
Useful when building formulas across both rows and columns.
Reference Types at a Glance
| Reference | Column | Row | When Copied | Best For |
|---|---|---|---|---|
A1 |
Changes | Changes | Fully relative | Standard calculations |
$A$1 |
Locked | Locked | Never changes | Constants and fixed cells |
$A1 |
Locked | Changes | Row adjusts | Fixed source column |
A$1 |
Changes | Locked | Column adjusts | Fixed header row |
Practical Example
=B2*$F$1
B2 changes as the formula is copied down:
B3, B4, B5.
$F$1 remains fixed because both the column and row are locked.
Math & Statistics
Excel Math & Statistical Formulas
Use these functions to total values, calculate averages, count entries, find minimum and maximum values, and summarize numeric data quickly.
| Function | Purpose | Example | Copy |
|---|---|---|---|
| SUM | Add all numbers in a range | =SUM(B2:B20) |
|
| AVERAGE | Calculate the arithmetic mean | =AVERAGE(B2:B20) |
|
| COUNT | Count cells containing numbers | =COUNT(B2:B20) |
|
| COUNTA | Count non-empty cells | =COUNTA(A2:A20) |
|
| COUNTBLANK | Count empty cells | =COUNTBLANK(A2:A20) |
|
| MIN | Return the smallest value | =MIN(B2:B20) |
|
| MAX | Return the largest value | =MAX(B2:B20) |
|
| MEDIAN | Return the middle value | =MEDIAN(B2:B20) |
|
| LARGE | Return the nth largest value | =LARGE(B2:B20,2) |
|
| SMALL | Return the nth smallest value | =SMALL(B2:B20,2) |
|
| PRODUCT | Multiply values together | =PRODUCT(B2:B5) |
|
| ABS | Return a number without its sign | =ABS(B2) |
Common Formula Patterns
=SUM(C2:C100)
Adds every sales value in column C.
=AVERAGE(C2:C100)
Calculates the average value of all numeric orders.
=LARGE(C2:C100,2)
Returns the second-largest number in the range.
=COUNTA(A2:A100)
Counts cells containing text, numbers, or other values.
COUNT when you only want numeric cells. Use
COUNTA when you want to count any non-empty cell.
05 — Logical Formulas
Excel IF & IFS Functions
Use IF and IFS to return different results depending on whether one or more conditions are true. These functions are useful for status checks, grading, thresholds, categories, and decision-based formulas.
IF Function
Tests one condition and returns one value when the condition is true and another value when it is false.
=IF(logical_test, value_if_true, value_if_false)
=IF(B2>=70,"Pass","Fail")
IFS Function
Tests several conditions in order and returns the result belonging to the first condition that evaluates to TRUE.
=IFS(test1, result1, test2, result2, ...)
=IFS(B2>=90,"A",B2>=80,"B",B2>=70,"C",TRUE,"F")
Common IF Formula Examples
Pass or Fail
Returns Pass when the score in B2 is 70 or higher.
=IF(B2>=70,"Pass","Fail")
Target Status
Compares an actual value in C2 with the target in D2.
=IF(C2>=D2,"Target Met","Below Target")
Check Blank Cell
Checks whether A2 is empty and returns a status message.
=IF(A2="","Missing","Complete")
Apply Discount
Calculates a 10% discount when the value in B2 is at least 1000.
=IF(B2>=1000,B2*10%,0)
Positive or Negative
Labels a value based on whether it is zero or greater.
=IF(B2>=0,"Positive","Negative")
Nested IF vs IFS
Multiple IF Functions
Older workbooks often place additional IF functions inside the false result of another IF.
=IF(B2>=90,"A",IF(B2>=80,"B",IF(B2>=70,"C","F")))
IFS Function
IFS is often easier to read when several sequential conditions need to be tested.
=IFS(B2>=90,"A",B2>=80,"B",B2>=70,"C",TRUE,"F")
IFS, Excel checks conditions from left to right.
Put higher or more specific thresholds before broader conditions.
06 — Logical Functions
Excel AND, OR & NOT Functions
Logical functions test whether conditions are true or false. Combine them with IF to build more powerful formulas that evaluate several criteria at once.
Require Every Condition
AND returns TRUE only when every condition is true.
=AND(logical1, logical2, ...)
=AND(B2>=70,C2="Complete")
Require Any Condition
OR returns TRUE when at least one condition is true.
=OR(logical1, logical2, ...)
=OR(B2="Yes",C2="Approved")
Reverse a Logical Result
NOT changes TRUE to FALSE and FALSE to TRUE.
=NOT(logical)
=NOT(B2="Cancelled")
Combine Logical Functions with IF
Pass Two Requirements
Returns Pass only when the score is at least 70 and attendance is at least 80%.
=IF(AND(B2>=70,C2>=80%),"Pass","Fail")
Multiple Accepted Statuses
Returns Approved when either condition matches.
=IF(OR(B2="Approved",B2="Pending"),"Continue","Stop")
Exclude a Status
Returns Active when the status is anything except Cancelled.
=IF(NOT(B2="Cancelled"),"Active","Inactive")
AND vs OR
| Function | Returns TRUE When | Example | Result |
|---|---|---|---|
| AND | All conditions are TRUE | =AND(TRUE,TRUE) |
TRUE |
| AND | All conditions are TRUE | =AND(TRUE,FALSE) |
FALSE |
| OR | At least one condition is TRUE | =OR(TRUE,FALSE) |
TRUE |
| OR | At least one condition is TRUE | =OR(FALSE,FALSE) |
FALSE |
AND when every requirement must be met. Use
OR when any one of several requirements is enough.
07 — Conditional Sums
Excel SUMIF & SUMIFS Functions
Use SUMIF and SUMIFS to add values only when specific conditions are met. SUMIF handles a single condition, while SUMIFS can evaluate multiple criteria.
Sum with One Condition
SUMIF adds values when one condition is true.
=SUMIF(range, criteria, sum_range)
=SUMIF(A2:A100,"East",C2:C100)
Adds values in column C when the corresponding cell in column A contains East.
Sum with Multiple Conditions
SUMIFS adds values only when all specified conditions are true.
=SUMIFS(sum_range, criteria_range1, criteria1, ...)
=SUMIFS(C2:C100,A2:A100,"East",B2:B100,"Apples")
Adds sales from column C where the region is East and the product is Apples.
Common SUMIF & SUMIFS Examples
Sum by Region
Add sales belonging to the East region.
=SUMIF(A2:A100,"East",C2:C100)
Sum Values Above a Threshold
Add only values greater than 1000.
=SUMIF(C2:C100,">1000")
Sum by Region and Product
Add sales where both the region and product match.
=SUMIFS(C2:C100,A2:A100,"East",B2:B100,"Apples")
Sum Between Two Dates
Add sales occurring during January 2026.
=SUMIFS(C2:C100,A2:A100,">="&DATE(2026,1,1),A2:A100,"<"&DATE(2026,2,1))
Sum Using a Cell as Criteria
Use the value entered in E2 as the condition.
=SUMIF(A2:A100,E2,C2:C100)
SUMIF vs SUMIFS
| Function | Conditions | Syntax Starts With | Best For |
|---|---|---|---|
| SUMIF | One | =SUMIF(range,...) |
Simple conditional totals |
| SUMIFS | Multiple | =SUMIFS(sum_range,...) |
Totals using several criteria |
SUMIF starts with the
criteria range, while SUMIFS starts with the range you
want to sum.
08 — Conditional Counting
Excel COUNTIF & COUNTIFS Functions
Use COUNTIF and COUNTIFS to count cells or rows that meet specific conditions. COUNTIF evaluates one criterion, while COUNTIFS can test multiple criteria at once.
Count with One Condition
COUNTIF counts cells in a range that match a single criterion.
=COUNTIF(range, criteria)
=COUNTIF(A2:A100,"East")
Counts how many cells in A2:A100 contain the value East.
Count with Multiple Conditions
COUNTIFS counts rows only when all specified criteria are satisfied.
=COUNTIFS(criteria_range1, criteria1, ...)
=COUNTIFS(A2:A100,"East",B2:B100,"Apples")
Counts rows where the region is East and the product is Apples.
Common COUNTIF & COUNTIFS Examples
Count a Specific Value
Count how many times East appears in a range.
=COUNTIF(A2:A100,"East")
Count Values Above a Number
Count numeric cells greater than 100.
=COUNTIF(C2:C100,">100")
Count Non-Blank Cells
Count cells that contain any value.
=COUNTIF(A2:A100,"<>")
Count Blank Cells
Count cells that are empty according to COUNTIF criteria.
=COUNTIF(A2:A100,"")
Count Two Criteria
Count East-region orders where sales are greater than 1000.
=COUNTIFS(A2:A100,"East",C2:C100,">1000")
Count Between Two Values
Count numbers from 100 through 500, inclusive.
=COUNTIFS(C2:C100,">=100",C2:C100,"<=500")
Working with Wildcards
*
Any Number of Characters
Use an asterisk to match any sequence of characters.
=COUNTIF(A2:A100,"*apple*")
?
One Character
Use a question mark to match exactly one character.
=COUNTIF(A2:A100,"A?C")
COUNTIF vs COUNTIFS
| Function | Criteria | Typical Formula | Best For |
|---|---|---|---|
| COUNTIF | One criterion | =COUNTIF(A:A,"East") |
Simple conditional counts |
| COUNTIFS | Multiple criteria | =COUNTIFS(A:A,"East",B:B,"Apples") |
Counting records using several conditions |
>100, <=500, and
<>Cancelled must normally be placed inside quotation marks
when written directly in COUNTIF or COUNTIFS.
09 — XLOOKUP
Excel XLOOKUP Function
XLOOKUP searches for a value in one range and returns the corresponding value from another range. It is a flexible modern replacement for many traditional VLOOKUP and HLOOKUP formulas.
Basic XLOOKUP
Search for a value and return the matching result from another column or row.
=XLOOKUP(lookup_value, lookup_array, return_array, [if_not_found])
=XLOOKUP(A2,D2:D100,E2:E100,"Not found")
Find a Product Price
Look up the product ID in A2 and return its price from column F.
=XLOOKUP(A2,D2:D100,F2:F100,"Not found")
Common XLOOKUP Examples
Exact Match
Find an employee ID and return the employee name.
=XLOOKUP(A2,D2:D100,E2:E100)
Custom Not Found Message
Display a readable message instead of #N/A.
=XLOOKUP(A2,D2:D100,E2:E100,"No match")
Lookup to the Left
Search column E and return a value from column D.
=XLOOKUP(A2,E2:E100,D2:D100)
Return Multiple Columns
Return several adjacent columns from one lookup.
=XLOOKUP(A2,D2:D100,E2:G100)
Wildcard Match
Find text using wildcard characters.
=XLOOKUP("*"&A2&"*",D2:D100,E2:E100,"Not found",2)
XLOOKUP Arguments
| Argument | Required? | Purpose |
|---|---|---|
lookup_value |
Yes | The value you want to find. |
lookup_array |
Yes | The range Excel searches. |
return_array |
Yes | The range containing the result to return. |
if_not_found |
No | A custom result when no match exists. |
match_mode |
No | Controls exact, approximate, or wildcard matching. |
search_mode |
No | Controls the direction and method used to search. |
XLOOKUP Match Modes
0
Exact Match
Default option. Returns an exact match.
-1
Exact or Next Smaller
Useful for thresholds and ranges.
1
Exact or Next Larger
Returns the next larger item if no exact match exists.
2
Wildcard Match
Allows * and ? wildcard characters.
10 — VLOOKUP
Excel VLOOKUP Function
VLOOKUP searches for a value in the first column of a table and returns a value from another column in the same row. It remains common in older workbooks and established Excel workflows.
Basic VLOOKUP
Search the first column of a table and return a value from a specified column.
=VLOOKUP(lookup_value, table_array, col_index_num, [range_lookup])
=VLOOKUP(A2,D2:F100,3,FALSE)
Find a Product Price
Look up the product ID in A2 and return the value from the third column of the lookup table.
=VLOOKUP(A2,D2:F100,3,FALSE)
Common VLOOKUP Examples
Exact Match
Find an ID and return the matching value.
=VLOOKUP(A2,D2:F100,2,FALSE)
Return a Different Column
Change the column index to return another field.
=VLOOKUP(A2,D2:G100,4,FALSE)
Handle Missing Matches
Wrap VLOOKUP with IFERROR to avoid displaying #N/A.
=IFERROR(VLOOKUP(A2,D2:F100,3,FALSE),"Not found")
Approximate Match
Use TRUE for sorted threshold tables such as commission or grade bands.
=VLOOKUP(B2,E2:F6,2,TRUE)
VLOOKUP Arguments
| Argument | Purpose | Example |
|---|---|---|
lookup_value |
The value you want to find. | A2 |
table_array |
The table containing the lookup and return columns. | D2:F100 |
col_index_num |
The table column number containing the result. | 3 |
range_lookup |
FALSE for exact match or TRUE for approximate match. | FALSE |
Exact vs Approximate Match
FALSE
Exact Match
Use FALSE when looking up IDs, names, product codes, email addresses, or other values that should match exactly.
=VLOOKUP(A2,D2:F100,3,FALSE)
TRUE
Approximate Match
Use TRUE for ordered ranges such as tax brackets, discounts, commission levels, or grading thresholds.
=VLOOKUP(B2,E2:F6,2,TRUE)
VLOOKUP Limitations
Looks Only to the Right
The lookup value must be in the first column of the selected table.
Uses Column Numbers
Inserting or removing columns can make the column index incorrect.
Exact Match Is Not the Default
Use FALSE explicitly when you require an exact result.
11 — INDEX & MATCH
Excel INDEX & MATCH Functions
INDEX and MATCH can be combined to create flexible lookup formulas. MATCH finds the position of a value, while INDEX returns the value stored at that position.
Return a Value by Position
INDEX returns a value from a range using its row position.
=INDEX(array, row_num, [column_num])
=INDEX(E2:E100,5)
Returns the fifth value from the range E2:E100.
Find a Value’s Position
MATCH searches a range and returns the relative position of a matching value.
=MATCH(lookup_value, lookup_array, [match_type])
=MATCH(A2,D2:D100,0)
Finds the position of the value in A2 within D2:D100.
A match type of 0 requests an exact match.
Combine INDEX + MATCH
MATCH determines which row contains the lookup value. INDEX then returns the corresponding result from another range.
MATCH finds the row position.
The position is passed into INDEX.
INDEX returns the result.
=INDEX(E2:E100,MATCH(A2,D2:D100,0))
Search for A2 in column D and return the corresponding value from column E.
Common INDEX & MATCH Examples
Basic Exact Lookup
Find an ID in column D and return its corresponding name from column E.
=INDEX(E2:E100,MATCH(A2,D2:D100,0))
Lookup to the Left
Search column E and return the matching value from column D.
=INDEX(D2:D100,MATCH(A2,E2:E100,0))
Handle Missing Matches
Use IFERROR to display a custom result when no match exists.
=IFERROR(INDEX(E2:E100,MATCH(A2,D2:D100,0)),"Not found")
Two-Way Lookup
Match both a row label and a column heading to return a value from a table.
=INDEX(B2:E10,MATCH(H2,A2:A10,0),MATCH(H3,B1:E1,0))
How INDEX & MATCH Works
| Part | Example | What It Does |
|---|---|---|
| MATCH | MATCH(A2,D2:D100,0) |
Finds the relative position of A2 in D2:D100. |
| INDEX | INDEX(E2:E100,...) |
Returns a value from E2:E100 at the specified position. |
| Combined | INDEX(E2:E100,MATCH(...)) |
Uses the position found by MATCH to return the corresponding result. |
INDEX & MATCH vs VLOOKUP
- Can look left or right
- Does not rely on a hard-coded column index
- Works well with flexible table layouts
- Useful in older Excel versions without XLOOKUP
- Often easier for beginners to read
- Widely used in existing spreadsheets
- Looks only to the right
- Uses a numeric return-column index
12 — Text Functions
Excel Text Functions
Excel text functions help you clean, combine, extract, transform, and format text. They are especially useful when working with names, product codes, imported data, and inconsistent text values.
Extract Characters from the Left
=LEFT(text, [num_chars])
=LEFT(A2,3)
Returns the first three characters from A2.
Extract Characters from the Right
=RIGHT(text, [num_chars])
=RIGHT(A2,4)
Returns the last four characters from A2.
Extract Text from the Middle
=MID(text, start_num, num_chars)
=MID(A2,4,5)
Starts at character 4 and returns five characters.
Count Characters
=LEN(text)
=LEN(A2)
Counts all characters in A2, including spaces.
Clean and Standardize Text
Remove Extra Spaces
TRIM removes leading and trailing spaces and reduces repeated internal spaces to a single space.
=TRIM(A2)
Convert to Uppercase
Change all letters to uppercase.
=UPPER(A2)
Convert to Lowercase
Change all letters to lowercase.
=LOWER(A2)
Capitalize Words
Capitalize the first letter of each word.
=PROPER(A2)
Combine Text
Join with the Ampersand Operator
A simple way to combine values with custom separators.
=A2&" "&B2
Combine Values
CONCAT joins text values or ranges without a built-in delimiter.
=CONCAT(A2," ",B2)
Join with a Delimiter
TEXTJOIN combines many values using a separator and can ignore empty cells.
=TEXTJOIN(", ",TRUE,A2:A10)
Find and Replace Text
Find Text Position
FIND returns the position of one text string inside another and is case-sensitive.
=FIND("@",A2)
Search Text
SEARCH also returns a text position but is not case-sensitive.
=SEARCH("excel",A2)
Replace Matching Text
SUBSTITUTE replaces matching text anywhere in a string.
=SUBSTITUTE(A2,"Old","New")
Replace by Position
REPLACE changes characters based on their position in the text.
=REPLACE(A2,1,3,"NEW")
Practical Text Formula Patterns
| Task | Formula | Purpose |
|---|---|---|
| Full name | =A2&" "&B2 |
Combines first and last names. |
| Email username | =LEFT(A2,FIND("@",A2)-1) |
Returns everything before the @ symbol. |
| Clean imported text | =TRIM(A2) |
Removes unnecessary spaces. |
| Normalize names | =PROPER(TRIM(A2)) |
Cleans spacing and capitalizes each word. |
| Join a range | =TEXTJOIN(", ",TRUE,A2:A10) |
Creates a comma-separated list and ignores empty cells. |
=PROPER(TRIM(A2)) first removes unnecessary spaces and then
standardizes capitalization.
13 — Date & Time
Excel Date & Time Functions
Excel stores dates and times as serial values, which makes it possible to calculate deadlines, extract date parts, count working days, and build dynamic date-based reports.
Return Today’s Date
=TODAY()
=TODAY()
Returns the current date and updates automatically when Excel recalculates.
Return Date and Time
=NOW()
=NOW()
Returns the current date and time.
Build a Date
=DATE(year, month, day)
=DATE(2026,9,15)
Creates a valid Excel date from separate year, month, and day values.
Build a Time
=TIME(hour, minute, second)
=TIME(14,30,0)
Creates a time value such as 14:30.
Extract Parts of a Date
Get the Year
Extract the year from a date stored in A2.
=YEAR(A2)
Get the Month
Return the month number from 1 to 12.
=MONTH(A2)
Get the Day
Return the day of the month.
=DAY(A2)
Get the Weekday
Return a weekday number where Monday is 1 and Sunday is 7.
=WEEKDAY(A2,2)
Date Calculations
Days Between Two Dates
Subtract the start date from the end date.
=B2-A2
Add 30 Days
Create a future date by adding days directly.
=A2+30
Add Months
Move a date forward by a specific number of months.
=EDATE(A2,3)
End of Month
Return the last day of the month containing A2.
=EOMONTH(A2,0)
Working Days
Count Working Days
Counts weekdays between two dates and can exclude a holiday range.
=NETWORKDAYS(A2,B2)
Calculate a Workday Deadline
Returns a date a specified number of working days before or after a start date.
=WORKDAY(A2,10)
Common Date & Time Formulas
| Task | Formula | Result |
|---|---|---|
| Current date | =TODAY() |
Today’s date |
| Current date and time | =NOW() |
Current timestamp |
| First day of month | =EOMONTH(A2,-1)+1 |
Month start |
| Last day of month | =EOMONTH(A2,0) |
Month end |
| One year later | =EDATE(A2,12) |
Date 12 months later |
| Age in full years | =DATEDIF(A2,TODAY(),"Y") |
Completed years |
45500, the formula
may be correct but the cell is formatted as General or Number. Apply a Date
format to display the serial value as a readable date.
14 — Rounding Functions
Excel Rounding Functions
Excel rounding functions let you control decimal places, round values up or down, snap numbers to specific multiples, and convert numbers to whole values.
Round Normally
=ROUND(number, num_digits)
=ROUND(A2,2)
Rounds A2 to two decimal places.
Always Round Away from Zero
=ROUNDUP(number, num_digits)
=ROUNDUP(A2,0)
Rounds the value away from zero to a whole number.
Always Round Toward Zero
=ROUNDDOWN(number, num_digits)
=ROUNDDOWN(A2,0)
Removes the decimal portion by rounding toward zero.
Round Down to an Integer
=INT(number)
=INT(A2)
Rounds a number down to the nearest integer.
Control Decimal Places
Two Decimal Places
Useful for currency, percentages, and report values.
=ROUND(A2,2)
Whole Number
Use zero digits to round to the nearest integer.
=ROUND(A2,0)
Nearest Ten
A negative num_digits value rounds digits to the left of the decimal point.
=ROUND(A2,-1)
Nearest Hundred
Round large values for summaries or reporting.
=ROUND(A2,-2)
Round to a Specific Multiple
Nearest Multiple
Round a value to the nearest specified multiple.
=MROUND(A2,5)
Example: 42 becomes 40 and 43 becomes 45 when rounding to multiples of 5.
Round Up to a Multiple
Round a positive value up to the next specified multiple.
=CEILING(A2,5)
Round Down to a Multiple
Round a positive value down to the previous specified multiple.
=FLOOR(A2,5)
Rounding Examples
| Formula | If A2 = 12.345 | Result |
|---|---|---|
=ROUND(A2,2) |
12.345 | 12.35 |
=ROUND(A2,1) |
12.345 | 12.3 |
=ROUND(A2,0) |
12.345 | 12 |
=ROUNDUP(A2,0) |
12.345 | 13 |
=ROUNDDOWN(A2,0) |
12.345 | 12 |
ROUND vs INT
Standard Rounding
ROUND uses standard rounding rules and lets you choose the number of digits.
=ROUND(7.8,0)
Round Down
INT rounds down to the nearest integer, which is important when working with negative values.
=INT(7.8)
15 — Dynamic Arrays
Excel Dynamic Array Formulas
Dynamic array formulas can return multiple results from a single formula. Excel automatically spills those results into neighboring cells, making many modern formulas shorter and easier to maintain.
One Formula, Multiple Results
A dynamic array formula is entered in one cell, but its results can automatically fill several rows or columns.
=SEQUENCE(5)
Reference the Entire Result
Add the # operator after the first cell of a spilled array
to reference the complete dynamic result.
=SUM(B2#)
If B2 contains a spilled formula, B2# refers to its full
current spill range.
SEQUENCE Function
Generate Number Sequences
SEQUENCE creates an array of sequential numbers across rows and columns.
=SEQUENCE(rows, [columns], [start], [step])
=SEQUENCE(10)
Creates the numbers 1 through 10 vertically.
=SEQUENCE(1,12)
Creates 12 sequential numbers horizontally.
=SEQUENCE(5,1,10,10)
Creates 10, 20, 30, 40, and 50.
Dynamic Array Examples
Create a Number Series
Generate a numbered list automatically without filling cells manually.
=SEQUENCE(20)
Create Monthly Dates
Generate twelve month-start dates beginning January 1, 2026.
=EDATE(DATE(2026,1,1),SEQUENCE(12,1,0,1))
Return Unique Values
Create a live list of distinct values from a range.
=UNIQUE(A2:A100)
Sort a Dynamic Result
Sort a spilled list automatically as source data changes.
=SORT(UNIQUE(A2:A100))
Important Dynamic Array Concepts
Spill Range
Excel expands results into neighboring cells automatically.
One Source Formula
Only the top-left cell contains the editable formula.
Automatic Resizing
The spill range can grow or shrink when the source data changes.
Spill Operator
Use # to reference the entire current spill range.
Common Dynamic Array Functions
| Function | Example | Purpose |
|---|---|---|
| FILTER | =FILTER(A2:C100,C2:C100>1000) |
Returns only rows that meet a condition. |
| SORT | =SORT(A2:A100) |
Returns a sorted version of a range. |
| UNIQUE | =UNIQUE(A2:A100) |
Returns distinct values. |
| SEQUENCE | =SEQUENCE(10) |
Generates sequential numbers. |
| RANDARRAY | =RANDARRAY(5,2) |
Generates an array of random numbers. |
If Excel cannot place all results into the required cells, it returns
#SPILL!. Check whether cells in the intended spill area
contain data, merged cells, or another obstruction.
16 — FILTER, SORT & UNIQUE
Excel FILTER, SORT & UNIQUE Functions
FILTER, SORT, and UNIQUE are modern dynamic array functions that make it easier to extract, organize, and deduplicate data without helper columns or manual filtering.
Return Matching Rows
=FILTER(array, include, [if_empty])
=FILTER(A2:C100,C2:C100>1000,"No results")
Returns rows from A2:C100 where the value in column C is greater than 1000.
Sort a Range
=SORT(array, [sort_index], [sort_order], [by_col])
=SORT(A2:C100,3,-1)
Sorts the range by its third column in descending order.
Return Distinct Values
=UNIQUE(array, [by_col], [exactly_once])
=UNIQUE(A2:A100)
Creates a dynamic list containing each distinct value once.
FILTER Examples
Filter by Region
Return only rows where column A contains East.
=FILTER(A2:C100,A2:A100="East","No results")
Filter Greater Than a Value
Return rows where sales in column C exceed 1000.
=FILTER(A2:C100,C2:C100>1000,"No results")
Filter with Multiple AND Conditions
Multiply logical tests when every condition must be true.
=FILTER(A2:C100,(A2:A100="East")*(C2:C100>1000),"No results")
Filter with OR Conditions
Add logical tests when either condition may be true.
=FILTER(A2:C100,(A2:A100="East")+(A2:A100="West"),"No results")
*
Every condition must be true.
+
At least one condition must be true.
SORT Examples
Sort A to Z
=SORT(A2:A100)
Sort order 1 is ascending and is the default.
Sort Z to A
=SORT(A2:A100,1,-1)
Use -1 for descending order.
Sort by a Specific Column
=SORT(A2:C100,3,-1)
Sorts the full table by its third column from largest to smallest.
UNIQUE Examples
Distinct Values
Return each value from column A once.
=UNIQUE(A2:A100)
Values Appearing Exactly Once
Return only entries that occur a single time in the range.
=UNIQUE(A2:A100,FALSE,TRUE)
Combine FILTER, SORT & UNIQUE
Create a Sorted Unique List
UNIQUE removes duplicates and SORT places the results in order.
=SORT(UNIQUE(A2:A100))
Sort Filtered Results
Filter the source data first and then sort the returned rows.
=SORT(FILTER(A2:C100,C2:C100>1000,"No results"),3,-1)
Unique Values That Meet a Condition
Filter a list by a condition and remove duplicate results.
=UNIQUE(FILTER(B2:B100,A2:A100="East",""))
Quick Reference
| Function | Best For | Example |
|---|---|---|
| FILTER | Returning rows that meet one or more conditions. | =FILTER(A2:C100,C2:C100>1000) |
| SORT | Creating a dynamically sorted copy of a range. | =SORT(A2:C100,3,-1) |
| UNIQUE | Creating a live list without duplicate values. | =UNIQUE(A2:A100) |
17 — Error Handling
Excel Error Handling Formulas
Error-handling functions help you replace formula errors with clearer messages, blanks, fallback values, or alternative calculations. The most useful functions are IFERROR, IFNA, ISERROR, and ISNA.
Handle Any Formula Error
=IFERROR(value, value_if_error)
=IFERROR(A2/B2,0)
Returns 0 if the calculation produces an error.
Handle Only #N/A
=IFNA(value, value_if_na)
=IFNA(XLOOKUP(A2,D2:D100,E2:E100),"Not found")
Replaces only #N/A while allowing other errors to remain visible.
Test for Any Error
=ISERROR(value)
=ISERROR(A2/B2)
Returns TRUE when the expression produces any Excel error.
Test Specifically for #N/A
=ISNA(value)
=ISNA(MATCH(A2,D2:D100,0))
Returns TRUE only when the expression produces #N/A.
Common IFERROR Patterns
Prevent #DIV/0!
Replace a division error with zero.
=IFERROR(A2/B2,0)
Show a Friendly Lookup Message
Replace a failed lookup with a clear text message.
=IFERROR(XLOOKUP(A2,D2:D100,E2:E100),"Not found")
Return a Blank Cell
Hide an error when an empty result is preferable.
=IFERROR(A2/B2,"")
Use an Alternative Calculation
Run a fallback formula when the first calculation fails.
=IFERROR(A2/B2,A2/C2)
IFERROR vs IFNA
Catch Any Error
IFERROR catches errors such as #N/A, #DIV/0!, #VALUE!, #REF!, #NAME?, and #NUM!.
=IFERROR(A2/B2,"Check formula")
Catch Only #N/A
IFNA is more targeted and is especially useful for lookup formulas where a missing match is expected.
=IFNA(XLOOKUP(A2,D2:D100,E2:E100),"No match")
Test for Errors Before Calculating
Detect Any Error
=IF(ISERROR(A2/B2),"Error",A2/B2)
Detect a Missing Match
=IF(ISNA(MATCH(A2,D2:D100,0)),"Missing","Found")
Error-Handling Quick Reference
| Function | Returns | Best Use |
|---|---|---|
| IFERROR | Fallback value when any error occurs. | General error handling. |
| IFNA | Fallback value only for #N/A. | Missing lookup matches. |
| ISERROR | TRUE or FALSE. | Testing whether any error exists. |
| ISNA | TRUE or FALSE. | Testing specifically for #N/A. |
IFERROR can make a worksheet look cleaner, but it can also hide real problems such as broken references or incorrect data types. Use it when the error condition is expected and you know what the fallback should be.
IFNA when you only want to handle
missing matches. It leaves unrelated formula errors visible, which makes
troubleshooting easier.
18 — Formula Operators
Excel Formula Operators
Excel operators control how values are calculated, compared, combined, and referenced inside formulas. Understanding them makes formulas easier to read, build, and troubleshoot.
Arithmetic Operators
Addition
Add numbers or cell values together.
=A2+B2
Subtraction
Subtract one value from another.
=A2-B2
Multiplication
Use an asterisk to multiply values.
=A2*B2
Division
Use a forward slash to divide values.
=A2/B2
Exponent
Raise a number to a power.
=A2^2
Percentage
Convert a number into a percentage value.
=A2*10%
Comparison Operators
| Operator | Meaning | Example |
|---|---|---|
= |
Equal to | =A2=B2 |
> |
Greater than | =A2>100 |
< |
Less than | =A2<100 |
>= |
Greater than or equal to | =A2>=100 |
<= |
Less than or equal to | =A2<=100 |
<> |
Not equal to | =A2<>"Complete" |
Comparison Operators Inside Functions
IF with Greater Than or Equal To
Test whether a score reaches a minimum threshold.
=IF(B2>=70,"Pass","Fail")
COUNTIF with Greater Than
Comparison criteria are placed inside quotation marks.
=COUNTIF(B2:B100,">100")
Compare Against a Cell
Join a comparison operator to a cell reference with an ampersand.
=COUNTIF(B2:B100,">"&D2)
Text Concatenation Operator
Combine Text with &
The ampersand joins text, numbers, or cell values into a single text string.
=A2&" "&B2
Reference Operators
Range Operator
A colon creates a continuous range between two references.
=SUM(A2:A10)
Union Operator
A comma can combine separate references into one reference expression.
=SUM(A2:A5,C2:C5)
Spill Range Operator
In modern Excel, # references the entire result of a spilled dynamic array.
=SUM(B2#)
Operator Precedence
Excel Calculates Operators in a Specific Order
Parentheses are the safest way to make the intended calculation order obvious.
-
1
Parentheses
() -
2
Exponentiation
^ -
3
Multiplication and Division
* / -
4
Addition and Subtraction
+ - -
5
Comparisons
= > < >= <= <>
=10+5*2
Excel multiplies 5 × 2 before adding 10.
=(10+5)*2
Parentheses force Excel to calculate 10 + 5 first.
19 — Common Formula Errors
Common Excel Formula Errors
Excel error messages usually point to a specific problem in a formula, reference, data type, or dynamic array. Learning what each error means makes troubleshooting much faster.
Division by Zero
Appears when a formula divides by zero or by an empty cell treated as zero.
=A2/B2
=IFERROR(A2/B2,0)
Value Not Available
Common in lookup formulas when Excel cannot find the requested value.
=XLOOKUP(A2,D2:D100,E2:E100)
=XLOOKUP(A2,D2:D100,E2:E100,"Not found")
Wrong Value Type
Appears when a formula receives text, numbers, or arguments in a form it cannot use.
Invalid Cell Reference
Appears when a formula points to a cell or range that no longer exists.
Unrecognized Name
Excel does not recognize part of the formula as a valid function, named range, or reference.
Invalid Numeric Calculation
Appears when Excel cannot produce a valid numeric result from the supplied arguments.
=SQRT(-1)
Dynamic Array Cannot Expand
A dynamic array formula needs more cells for its results, but something is blocking the spill range.
=UNIQUE(A2:A100)
Display Problem
A row of hash symbols is usually a display issue rather than a formula error.
Error Quick Reference
| Error | Usually Means | Check First |
|---|---|---|
#DIV/0! |
Division by zero. | The divisor cell. |
#N/A |
A lookup cannot find a match. | Lookup value and source data. |
#VALUE! |
An argument has the wrong data type. | Text, numbers, and spaces. |
#REF! |
A reference is invalid. | Deleted rows, columns, or sheets. |
#NAME? |
Excel does not recognize a name. | Function spelling and named ranges. |
#NUM! |
A numeric calculation is invalid. | Numeric arguments. |
#SPILL! |
A dynamic array is blocked. | Cells around the spill formula. |
##### |
The result cannot be displayed. | Column width and formatting. |
Troubleshooting Checklist
Check the Formula Syntax
Look for missing parentheses, quotation marks, commas, or incorrect function names.
Inspect Cell References
Make sure ranges still exist and that copied formulas reference the intended cells.
Check Data Types
Numbers stored as text and hidden spaces can cause formulas and lookups to fail.
Evaluate Smaller Parts
Break a long formula into smaller pieces to find which part returns the error.
Check Absolute References
A reference may have shifted when the formula was copied to another row or column.
Use Error Handling Last
Fix the underlying problem before hiding an unexpected error with IFERROR.
Common Fixes
Check Before Dividing
=IF(B2=0,0,A2/B2)
Provide a Lookup Fallback
=XLOOKUP(A2,D2:D100,E2:E100,"Not found")
Reference the Spill Result
=SUM(B2#)
An error message is often useful diagnostic information. Avoid wrapping every formula in IFERROR automatically, because doing so can hide broken references, incorrect data, and other problems that should be corrected.
20 — Practical Examples
Practical Excel Formula Examples
These practical examples combine common Excel functions into formulas you can adapt for sales reports, status tracking, lookups, dates, commissions, and data cleaning.
Calculate Line Total
Multiply quantity by unit price to calculate the value of each row.
=B2*C2
Calculate Conditional Commission
Pay a 10% commission only when sales reach the required threshold.
=IF(B2>=1000,B2*10%,0)
Mark Targets as Met
Compare actual performance against a target stored in another cell.
=IF(B2>=C2,"Target Met","Below Target")
Find a Product Price
Look up a product ID and return its current price from another table.
=XLOOKUP(A2,D2:D100,E2:E100,"Not found")
Create a Due Date
Add 30 calendar days to the date in A2.
=A2+30
Clean and Standardize Names
Remove extra spaces and convert names into proper capitalization.
=PROPER(TRIM(A2))
Sales & Reporting Examples
Total Sales
Sum all sales values in a column.
=SUM(C2:C100)
Average Order Value
Calculate the average value of completed sales.
=AVERAGE(C2:C100)
Sales for One Region
Sum sales where the region in column A equals East.
=SUMIF(A2:A100,"East",C2:C100)
Sales for Region and Product
Sum sales only when both region and product match.
=SUMIFS(C2:C100,A2:A100,"East",B2:B100,"Apples")
Status & Workflow Examples
Check Whether a Cell Is Empty
Display a clear status depending on whether required data has been entered.
=IF(A2="","Missing","Complete")
Check Score and Completion
Return Pass only when both requirements are satisfied.
=IF(AND(B2>=70,C2="Complete"),"Pass","Review")
Lookup & Data Retrieval Examples
Return a Product Description
Find an ID in column D and return its description from column E.
=XLOOKUP(A2,D2:D100,E2:E100,"Not found")
Lookup from an Older Workbook
Use VLOOKUP when maintaining an existing workbook that relies on it.
=VLOOKUP(A2,D2:F100,3,FALSE)
Flexible INDEX & MATCH Lookup
Match an ID and return the corresponding value from another range.
=INDEX(E2:E100,MATCH(A2,D2:D100,0))
Date & Deadline Examples
Calculate a Business-Day Deadline
Add ten working days to a start date while skipping weekends.
=WORKDAY(A2,10)
Find the End of the Month
Return the final date of the month containing the date in A2.
=EOMONTH(A2,0)
Dynamic Report Example
Show High-Value Sales First
Filter the table to sales above 1000, then sort those rows by the third column from largest to smallest.
=SORT(FILTER(A2:C100,C2:C100>1000,"No results"),3,-1)
Practical Formula Cheat Sheet
| Task | Formula | Use Case |
|---|---|---|
| Line total | =B2*C2 |
Invoices and sales orders. |
| Commission | =IF(B2>=1000,B2*10%,0) |
Sales incentives. |
| Conditional total | =SUMIFS(C2:C100,A2:A100,"East") |
Reports by category or region. |
| Lookup | =XLOOKUP(A2,D2:D100,E2:E100,"Not found") |
Product or employee records. |
| Clean text | =PROPER(TRIM(A2)) |
Imported names and labels. |
| Business deadline | =WORKDAY(A2,10) |
Project and delivery dates. |
| Dynamic report | =FILTER(A2:C100,C2:C100>1000) |
Live filtered reporting. |
21 — Best Practices
Excel Formula Best Practices
Well-structured formulas are easier to understand, audit, reuse, and maintain. These best practices help reduce errors and make workbooks more reliable over time.
Use Clear Cell References
Use relative, absolute, or mixed references deliberately so formulas behave correctly when copied.
=A2*B2
=A2*$F$1
Avoid Hard-Coded Values
Put rates, targets, tax percentages, and other changing assumptions in cells instead of burying them inside formulas.
=A2*1.25
=A2*$F$1
Keep Formulas Readable
Break complex logic into clear steps when one giant formula becomes difficult to understand or debug.
Use Tables for Growing Data
Excel Tables automatically expand as new rows are added and make formulas easier to understand with structured references.
=SUM(Sales[Amount])
Use Named Ranges Carefully
Meaningful names can make formulas easier to read, especially for rates, thresholds, dates, and frequently reused ranges.
=Revenue*TaxRate
Handle Errors Intentionally
Use IFERROR or IFNA when an error condition is expected, but do not automatically hide every error in the workbook.
=IFNA(XLOOKUP(A2,D2:D100,E2:E100),"Not found")
Test Edge Cases
Check how formulas behave with blanks, zeros, negative numbers, duplicates, missing lookups, and unexpected text values.
Prefer Modern Functions When Appropriate
Functions such as XLOOKUP, FILTER, SORT, and UNIQUE can replace more complicated older formulas in modern versions of Excel.
=XLOOKUP(A2,D2:D100,E2:E100,"Not found")
Better Formula Patterns
Hard-Code the Same Criteria Repeatedly
=SUMIF(A2:A100,"East",C2:C100)
If the region changes frequently, editing the formula each time is unnecessary.
=SUMIF(A2:A100,E2,C2:C100)
Hide Every Error
=IFERROR(A2/B2,"")
This may hide unexpected problems that should be investigated.
=IF(B2=0,0,A2/B2)
Fragile Lookup Column Numbers
=VLOOKUP(A2,D2:G100,4,FALSE)
Column numbers can become incorrect if the lookup table structure changes.
=XLOOKUP(A2,D2:D100,G2:G100,"Not found")
Formula Auditing Checklist
Check References
Verify that relative and absolute references behave correctly when copied.
Check Inputs
Confirm that numbers, dates, and text are stored in the expected format.
Check Boundaries
Test minimum, maximum, zero, blank, and negative values where relevant.
Check Missing Data
Test lookup formulas when the requested value does not exist.
Check Copied Formulas
Inspect the first and last rows after filling formulas down a large range.
Check Dependencies
Make sure formulas do not rely on deleted sheets, columns, or outdated ranges.
Workbook Maintenance Tips
Keep Inputs Separate
Store assumptions and editable values in clearly identified cells or sections instead of mixing them into calculation formulas.
Document Complex Logic
Use clear headings, notes, and descriptive labels so another person can understand what the workbook is calculating.
Avoid Unnecessary Complexity
Do not combine several functions simply because you can. Prefer the simplest formula that produces the correct result.
Review Older Workbooks
Check whether outdated ranges, hard-coded assumptions, or legacy formulas can be simplified without breaking compatibility requirements.
For official syntax, compatibility details, and additional examples, see the Microsoft Excel formulas documentation .
22 — FAQ
Excel Formulas FAQ
Quick answers to common questions about Excel formulas, cell references, lookup functions, dynamic arrays, formula errors, and regional settings.
What is the difference between an Excel formula and a function?
A formula is any expression that starts with an equals
sign, such as =A2+B2. A function is a
predefined calculation used inside a formula, such as
=SUM(A2:A10).
How do I lock a cell reference in Excel?
Add dollar signs to create an absolute reference. For example,
$A$1 locks both the column and row when the formula is
copied.
While editing a reference, pressing F4 in Excel can cycle through the available reference types.
Should I use XLOOKUP or VLOOKUP?
For new workbooks in modern Excel, XLOOKUP is usually the more flexible choice. It can return values from either side of the lookup column, uses exact matching by default, and does not require a numeric column index.
VLOOKUP remains important when maintaining older workbooks or working with environments where XLOOKUP is unavailable.
=XLOOKUP(A2,D2:D100,E2:E100,"Not found")
=VLOOKUP(A2,D2:E100,2,FALSE)
Why is Excel showing my formula as text?
A formula may appear as text when the cell is formatted as Text, when the formula begins with an apostrophe, or when Excel’s Show Formulas mode is enabled.
Change the cell format from Text to General.
Remove any apostrophe before the equals sign.
Edit the formula and press Enter again after changing the format.
Check whether Show Formulas is enabled.
What does #SPILL! mean in Excel?
#SPILL! means a dynamic array formula cannot place all
of its results into the required cells.
Check the cells around the formula for existing values, merged cells, or another obstruction. Once the spill area is clear, Excel can normally return the full dynamic array.
=UNIQUE(A2:A100)
How do I copy a formula without changing its cell references?
Use absolute references for any cells that must remain fixed.
For example, if F1 contains a tax rate, use
=A2*$F$1 instead of =A2*F1.
The reference to A2 can change as the formula is copied, while
$F$1 always points to the same cell.
Why does Excel use semicolons instead of commas in my formulas?
Formula separators can vary with regional settings. Some Excel installations use commas between function arguments, while others use semicolons.
=IF(A2>=70,"Pass","Fail")
=IF(A2>=70;"Pass";"Fail")
The formulas on this cheat sheet use commas because that is the common English-language Excel convention.
How can I find an error inside a long Excel formula?
Break the formula into smaller parts and test each part separately. Check cell references, parentheses, quotation marks, argument separators, and data types.
Excel’s formula auditing tools, including Evaluate Formula, can also help show how a complex formula is being calculated step by step.
Why does an Excel lookup return #N/A even when the value looks correct?
Common causes include extra spaces, numbers stored as text, different data types, hidden characters, or a lookup value that is not actually present in the source range.
Functions such as TRIM can help clean imported text, but
it is usually better to correct the underlying data before adding
error handling.
Do Excel formulas update automatically when source data changes?
In normal automatic calculation mode, Excel recalculates dependent formulas when referenced data changes.
If formulas are not updating, check whether the workbook has been switched to manual calculation mode.