Back to Guides
Microsoft 365 · Excel

Essential Excel Formulas

Excel's real power lies in its formulas. This reference guide covers the formulas you'll reach for most often — from simple sums to powerful lookups — with plain-English explanations and practical examples you can use straight away.

Maths & Aggregation

=SUM(A1:A10)SUM

Adds up all the numbers in a range of cells.

When to use it

Totalling a column of sales figures, expenses, or hours worked.

Real-world example

=SUM(B2:B13) adds up January through December sales in column B.

=AVERAGE(A1:A10)AVERAGE

Calculates the mean (average) of a range of numbers.

When to use it

Finding the average score, spend, or duration across a dataset.

Real-world example

=AVERAGE(C2:C31) gives the average daily website visits for a month.

=COUNT(A1:A10)COUNT

Counts how many cells in a range contain numbers.

When to use it

Counting how many rows have been filled in with a numeric value.

Real-world example

=COUNT(D2:D100) tells you how many orders have a quantity entered.

=COUNTA(A1:A10)COUNTA

Counts all non-empty cells in a range, including text.

When to use it

Counting how many rows have any data at all — not just numbers.

Real-world example

=COUNTA(A2:A500) counts how many customer names have been entered.

=COUNTIF(A1:A10,"Criteria")COUNTIF

Counts cells that meet a single condition.

When to use it

Counting how many times a specific value appears in a list.

Real-world example

=COUNTIF(E2:E200,"Pending") counts all orders with a Pending status.

=COUNTIFS(A1:A10,"X",B1:B10,">5")COUNTIFS

Counts cells that meet multiple conditions across different ranges.

When to use it

Counting rows that match two or more criteria simultaneously.

Real-world example

=COUNTIFS(E2:E200,"Complete",F2:F200,"London") counts completed orders from London.

=SUMIF(A1:A10,"Criteria",B1:B10)SUMIF

Adds up values in one range where a corresponding range meets a condition.

When to use it

Summing sales for a specific product, region, or team member.

Real-world example

=SUMIF(C2:C200,"North",D2:D200) totals revenue for the North region only.

=SUMIFS(C1:C10,A1:A10,"X",B1:B10,">0")SUMIFS

Adds up values where multiple conditions are all met.

When to use it

Totalling figures that match two or more criteria at once.

Real-world example

=SUMIFS(D2:D200,C2:C200,"North",E2:E200,"Q1") sums North region Q1 revenue.

=MAX(A1:A10)MAX

Returns the largest number in a range.

When to use it

Finding the highest sale, score, or value in a dataset.

Real-world example

=MAX(B2:B13) shows the best-performing month's revenue.

=MIN(A1:A10)MIN

Returns the smallest number in a range.

When to use it

Finding the lowest value — useful for spotting outliers or minimums.

Real-world example

=MIN(B2:B13) shows the worst-performing month's revenue.

=ROUND(A1,2)ROUND

Rounds a number to a specified number of decimal places.

When to use it

Cleaning up calculated values for display in reports or invoices.

Real-world example

=ROUND(C5*0.2,2) rounds a 20% VAT calculation to two decimal places.

=ABS(A1)ABS

Returns the absolute (positive) value of a number, removing any minus sign.

When to use it

Converting negative variances or differences into positive numbers for comparison.

Real-world example

=ABS(B5-C5) shows the size of a budget variance regardless of direction.

Lookup & Reference

=VLOOKUP(A2,Sheet2!A:C,2,FALSE)VLOOKUP

Searches the first column of a table for a value and returns data from another column in the same row.

When to use it

Pulling a price, name, or category from a reference table using a code or ID.

Real-world example

=VLOOKUP(A2,Products!A:C,2,FALSE) fetches the product name for the code in A2.

=XLOOKUP(A2,Sheet2!A:A,Sheet2!B:B)XLOOKUP

A modern, more flexible replacement for VLOOKUP — searches any column and returns from any other column.

When to use it

Looking up values without needing to count column numbers; handles missing values gracefully.

Real-world example

=XLOOKUP(A2,Products!A:A,Products!C:C,"Not found") returns the price or a friendly message.

=INDEX(B1:B10,MATCH(D1,A1:A10,0))INDEX / MATCH

MATCH finds the position of a value in a range; INDEX returns the value at that position in another range.

When to use it

A powerful alternative to VLOOKUP that can look left and handles column changes gracefully.

Real-world example

=INDEX(C2:C100,MATCH("Smith",A2:A100,0)) finds Smith's department from a staff list.

=HLOOKUP(A1,A1:Z2,2,FALSE)HLOOKUP

Like VLOOKUP but searches across a row instead of down a column.

When to use it

Looking up values in a horizontally laid-out reference table.

Real-world example

=HLOOKUP("March",B1:N2,2,FALSE) retrieves the March budget from a horizontal plan.

=INDIRECT("Sheet1!A1")INDIRECT

Returns the value of a cell reference built from a text string.

When to use it

Dynamically referencing different sheets or ranges based on a cell value.

Real-world example

=INDIRECT(A1&"!B5") reads cell B5 from whichever sheet name is in A1.

=OFFSET(A1,2,1,1,1)OFFSET

Returns a reference shifted a number of rows and columns from a starting cell.

When to use it

Building dynamic ranges that expand or shift based on inputs.

Real-world example

=OFFSET(A1,0,0,COUNTA(A:A),1) creates a dynamic range covering all filled rows in column A.

Text & String Handling

=A1&" "&B1Concatenate (&)

Joins text from multiple cells into one string using the & operator.

When to use it

Combining first and last names, building full addresses, or creating reference codes.

Real-world example

=A2&" "&B2 joins "John" and "Smith" into "John Smith".

=TEXTJOIN(", ",TRUE,A1:A5)TEXTJOIN

Joins a range of text values with a delimiter, optionally skipping empty cells.

When to use it

Creating a comma-separated list from a column of values.

Real-world example

=TEXTJOIN(", ",TRUE,B2:B10) produces "Alice, Bob, Carol" from a list of names.

=LEFT(A1,3)LEFT

Extracts a specified number of characters from the left of a text string.

When to use it

Pulling a prefix, code, or area code from a longer string.

Real-world example

=LEFT(A2,3) extracts the first three characters of a product code like "SKU-001".

=RIGHT(A1,4)RIGHT

Extracts a specified number of characters from the right of a text string.

When to use it

Pulling a suffix, extension, or last few digits from a string.

Real-world example

=RIGHT(A2,4) extracts the year from a date string like "Report-2024".

=MID(A1,3,5)MID

Extracts a substring from the middle of a text string, starting at a given position.

When to use it

Pulling a specific segment from a structured code or reference number.

Real-world example

=MID(A2,5,3) extracts characters 5–7 from a reference like "INV-2024-001".

=LEN(A1)LEN

Returns the number of characters in a text string.

When to use it

Validating data entry lengths, or checking for unexpected extra characters.

Real-world example

=LEN(A2) flags entries in a postcode column that are longer than 8 characters.

=TRIM(A1)TRIM

Removes extra spaces from a text string, leaving only single spaces between words.

When to use it

Cleaning up data imported from other systems that contains stray spaces.

Real-world example

=TRIM(A2) fixes " John Smith " to "John Smith" before using it in a lookup.

=UPPER(A1)UPPER / LOWER / PROPER

UPPER converts text to all capitals; LOWER to all lowercase; PROPER capitalises each word.

When to use it

Standardising the case of names, codes, or imported data.

Real-world example

=PROPER(A2) converts "john smith" to "John Smith" for a clean customer list.

=SUBSTITUTE(A1,"old","new")SUBSTITUTE

Replaces all occurrences of a specific text within a string with new text.

When to use it

Cleaning or reformatting data — removing unwanted characters or replacing codes.

Real-world example

=SUBSTITUTE(A2,"-","") strips hyphens from a phone number like "07700-900-123".

=FIND("@",A1)FIND / SEARCH

Returns the position of a character or substring within a text string. FIND is case-sensitive; SEARCH is not.

When to use it

Locating a delimiter so you can extract text around it with LEFT, MID, or RIGHT.

Real-world example

=FIND("@",A2) finds the position of @ in an email address to help extract the domain.

=TEXT(A1,"DD/MM/YYYY")TEXT

Converts a number or date into a formatted text string.

When to use it

Displaying dates or numbers in a specific format when concatenating them with text.

Real-world example

="Report for "&TEXT(A2,"MMMM YYYY") produces "Report for October 2024".

Logic & Conditionals

=IF(A1>100,"Over budget","OK")IF

Returns one value if a condition is true, and another if it is false.

When to use it

Flagging rows that meet a threshold, categorising data, or showing status labels.

Real-world example

=IF(C2>1000,"High value","Standard") labels orders above £1,000.

=IFS(A1>90,"A",A1>70,"B",A1>50,"C",TRUE,"Fail")IFS

Tests multiple conditions in order and returns the result for the first one that is true.

When to use it

Assigning grades, tiers, or categories based on several thresholds.

Real-world example

=IFS(B2>10000,"Platinum",B2>5000,"Gold",B2>1000,"Silver",TRUE,"Bronze") assigns customer tiers.

=AND(A1>0,B1<100)AND / OR

AND returns TRUE only if all conditions are met; OR returns TRUE if any condition is met.

When to use it

Building compound conditions inside IF formulas.

Real-world example

=IF(AND(C2="Active",D2>0),"Eligible","Not eligible") checks two conditions at once.

=IFERROR(A1/B1,0)IFERROR

Returns a specified value if a formula produces an error; otherwise returns the formula result.

When to use it

Preventing #DIV/0!, #N/A, or #VALUE! errors from appearing in reports.

Real-world example

=IFERROR(VLOOKUP(A2,Products!A:C,2,FALSE),"Unknown") shows "Unknown" if no match is found.

=ISBLANK(A1)ISBLANK / ISNUMBER / ISTEXT

Returns TRUE or FALSE based on whether a cell is empty, contains a number, or contains text.

When to use it

Checking data completeness or driving conditional formatting and IF logic.

Real-world example

=IF(ISBLANK(B2),"Missing","Complete") flags rows where a required field is empty.

Dates & Times

=TODAY()TODAY / NOW

TODAY() returns the current date; NOW() returns the current date and time. Both update automatically.

When to use it

Calculating how many days have passed, or stamping the current date in a report.

Real-world example

=TODAY()-B2 calculates how many days ago an order was placed.

=DATEDIF(A1,B1,"D")DATEDIF

Calculates the difference between two dates in days ("D"), months ("M"), or years ("Y").

When to use it

Calculating age, tenure, or the number of days between two events.

Real-world example

=DATEDIF(B2,TODAY(),"Y") calculates an employee's years of service.

=EDATE(A1,3)EDATE

Returns a date a specified number of months before or after a given date.

When to use it

Calculating contract end dates, renewal dates, or payment schedules.

Real-world example

=EDATE(B2,12) calculates the renewal date one year after a contract start date.

=WORKDAY(A1,10)WORKDAY

Returns the date a specified number of working days (excluding weekends) from a start date.

When to use it

Calculating delivery dates, SLA deadlines, or project milestones.

Real-world example

=WORKDAY(B2,5) gives the date five working days after an order is placed.

=YEAR(A1)YEAR / MONTH / DAY

Extracts the year, month, or day number from a date value.

When to use it

Grouping or filtering data by year, month, or day in reports.

Real-world example

=MONTH(A2) extracts the month number so you can group sales by month.

=WEEKDAY(A1,2)WEEKDAY

Returns a number representing the day of the week for a given date.

When to use it

Identifying weekends, filtering by day of week, or scheduling logic.

Real-world example

=WEEKDAY(A2,2) returns 6 or 7 for Saturday and Sunday, useful for flagging weekend dates.

Statistical & Financial

=MEDIAN(A1:A10)MEDIAN

Returns the middle value in a sorted list of numbers.

When to use it

Understanding the typical value in a dataset without being skewed by outliers.

Real-world example

=MEDIAN(C2:C200) gives the median order value, unaffected by a few very large orders.

=STDEV(A1:A10)STDEV

Calculates the standard deviation — how spread out values are from the average.

When to use it

Measuring consistency or variability in performance data.

Real-world example

=STDEV(D2:D50) shows how consistently a team member hits their targets.

=RANK(A1,A1:A10,0)RANK

Returns the rank of a number within a list, either ascending or descending.

When to use it

Ranking salespeople, products, or regions by performance.

Real-world example

=RANK(B2,B$2:B$20,0) ranks each salesperson from highest to lowest revenue.

=PERCENTILE(A1:A10,0.9)PERCENTILE

Returns the value at a given percentile in a dataset.

When to use it

Finding the top 10% threshold or understanding distribution.

Real-world example

=PERCENTILE(C2:C200,0.9) finds the revenue figure that 90% of orders fall below.

=PMT(rate,nper,pv)PMT

Calculates the regular payment amount for a loan based on interest rate, number of periods, and principal.

When to use it

Modelling loan repayments, lease costs, or instalment plans.

Real-world example

=PMT(0.05/12,60,-10000) calculates the monthly repayment on a £10,000 loan at 5% over 5 years.

=NPV(rate,value1,value2,...)NPV

Calculates the net present value of an investment based on a discount rate and future cash flows.

When to use it

Evaluating whether a project or investment is financially worthwhile.

Real-world example

=NPV(0.1,B2:B6) calculates the present value of five years of projected cash flows at a 10% discount rate.

Tip: In Excel, start typing a formula name after the = sign and press Tab to autocomplete it. Excel will also show you the expected arguments as you type — hover over the formula name for the full description.

Keep exploring

Browse all our Microsoft 365 and Power Platform guides.

Browse all guides