Excel Formulas

Excel Formulas (Basic to Advanced)

August 3rd, 2026
15026
6:00 Minutes

Mastering Excel formulas has become an essential skill for every individual working in tech or the tech industry. The reason is clear: most white-collar jobs require working with data that often includes using Microsoft Excel. There are a lot of formulas, and it can be complicated to learn them all at once. You just have to learn what each formula does in isolation, then start to implement them in real-world cases.

This guide will help you do that. It includes a comprehensive list of different formulas to run on the same 10-row order-tracking sheet. By the end, you'll have effectively built one working tracker instead of skimming fifty flashcards. I'll show the dataset once, then reuse the same cell references all the way through. If you want to follow along, open a blank sheet and copy the table below first.

The Sample Sheet We'll Use Throughout

This is a simple order tracker for a small sales team. Row 1 is headers; data runs from row 2 to row 11.

A: Order ID B: Region C: Rep D: Units E: Unit Price F: Order Date G: Status H: Total
1001NorthPriya Sharma1245005-Jan-2026Delivered5400
1002SouthAman Verma862007-Jan-2026Pending4960
1003EastPriya Sharma1530010-Jan-2026Delivered4500
1004WestNeha Gupta590012-Jan-2026Cancelled4500
1005NorthAman Verma2045015-Jan-2026Delivered9000
1006SouthNeha Gupta1062018-Jan-2026Pending6200
1007EastPriya Sharma730020-Jan-2026Delivered2100
1008WestAman Verma1890022-Jan-2026Delivered16200
1009NorthNeha Gupta945025-Jan-2026Pending4050
1010SouthPriya Sharma1462028-Jan-2026Delivered8680

excel formulas

Column H (Total) is just =D2*E2 filled down - keep that in the sheet, because a few formulas later reference it directly.

Jump to a Section

Basic & Math Formulas

Key takeaway: these are the formulas you'll type without thinking about it within a week - they're the arithmetic layer everything else sits on top of.

  • SUM - total revenue across every order:
=SUM(H2:H11)

Returns 65,590. The one habit worth building early: select a full column range (H2:H11) rather than typing individual cells, so new rows you add later get picked up automatically if you convert the range to a Table.

  • AVERAGE - average units per order:
=AVERAGE(D2:D11)

Gives 11.8. Worth knowing: AVERAGE ignores blank cells but not zeros - a zero-unit order will drag this down in a way a blank row won't.

average formula in excel

  • COUNT - how many orders have a numeric Units value:
=COUNT(D2:D11)

Returns 10. If you instead need to count cells with text in them (say, counting how many rows have any Status entered at all), use COUNTA - COUNT only looks at numbers.

count excel formula

  • MIN and MAX - smallest and largest order value:
=MIN(H2:H11)
=MAX(H2:H11)

2,100 and 16,200. Useful as a quick sanity check before you present numbers - if MAX looks suspiciously high, you'll usually find a decimal or unit-price typo behind it.

min and max excel formula

=ROUND(AVERAGE(H2:H11),0)

6,559. Rounding at the display stage rather than rounding the raw data keeps your totals accurate even though the report looks tidy.

round formula in excel

  • ABS - how far order 1001 is from a 6,000 target, regardless of direction:
=ABS(H2-6000)

600. This is the formula people reach for in variance reports where "over" and "under" both need to show as a positive gap.

abs excel formula

Logical Formulas

  • IF - flag high-value orders:
=IF(H2>=10000,"High Value","Standard")

Order 1008 (16,200) returns "High Value"; everything else returns "Standard."

  • AND - only true if both conditions hold:
=AND(G2="Delivered",H2>=5000)

Checks that an order is both delivered and worth at least 5,000. On its own AND just returns TRUE/FALSE - it earns its keep once you wrap it in IF (see the Combining Formulas section below).

  • OR - true if either condition holds:
=OR(G2="Pending",G2="Cancelled")

Flags anything that isn't a completed sale yet - handy for a "needs follow-up" column.

  • NOT - reverses a test:
=NOT(G2="Cancelled")

Returns TRUE for every status except Cancelled. It reads more naturally than an OR of every other status when you only care about excluding one thing.

  • IFS - tiered categories without nesting IF inside IF:
=IFS(H2>=15000,"Platinum",H2>=8000,"Gold",TRUE,"Standard")

Order 1008 (16,200) → Platinum, order 1005 (9,000) → Gold, everything else → Standard. The trailing TRUE,"Standard" is doing the job an ELSE would do in other languages - don't skip it or non-matching rows return #N/A.

  • SWITCH - map a value to fixed labels:
=SWITCH(B2,"North","N","South","S","East","E","West","W")

Best for a short, known list of values (like your four regions) - once you're past six or seven cases, a lookup table is easier to maintain than a long SWITCH.

Conditional Formulas (SUMIF, COUNTIF, SUMIFS)

  • SUMIF - total revenue from the North region only:
=SUMIF(B2:B11,"North",H2:H11)

5,400 + 9,000 + 4,050 = 18,450.

  • COUNTIF - how many orders were actually delivered:
=COUNTIF(G2:G11,"Delivered")

Returns 6.

  • AVERAGEIF - average order size for the North region:
=AVERAGEIF(B2:B11,"North",H2:H11)

6,150.

  • SUMIFS - revenue from North orders that were delivered (two conditions, not one):
=SUMIFS(H2:H11,B2:B11,"North",G2:G11,"Delivered")

5,400 + 9,000 = 14,400. Note the argument order flips versus SUMIF - the sum range comes first here, not last. This trips people up constantly when switching between the two.

  • COUNTIFS - how many South orders are still Pending:
=COUNTIFS(B2:B11,"South",G2:G11,"Pending")

Returns 1 (order 1002).

Lookup & Reference Formulas

Key takeaway: if you're on Microsoft 365, learn XLOOKUP first and treat VLOOKUP/INDEX-MATCH as "what to use if a client's file is on an older Excel version."

  • XLOOKUP - find the rep for order 1005:
=XLOOKUP(1005,A2:A11,C2:C11)

Returns "Aman Verma." Unlike VLOOKUP, the lookup column doesn't have to be the leftmost one, and a missing match returns a clean value you set yourself instead of an ugly #N/A - add a fourth argument like ,"Order not found" and you get that for free.

  • VLOOKUP - the same lookup, the older way:
=VLOOKUP(1005,A2:H11,3,FALSE)

Column 3 counting from A means column C (Rep). This is the formula's biggest weakness in practice - insert a new column between A and C and the "3" now points somewhere else, silently. XLOOKUP doesn't have this problem because you reference the return column directly.

  • INDEX - pull the 5th rep in the list by position:
=INDEX(C2:C11,5)

Returns "Aman Verma" (row 5 of the range, which is order 1005).

  • MATCH - find where order 1005 sits in the list:
=MATCH(1005,A2:A11,0)

Returns 5 - that's the position INDEX used above. This is why INDEX and MATCH are almost always taught together: MATCH finds the row, INDEX returns the value at that row.

  • XMATCH - the newer version of MATCH:
=XMATCH(1005,A2:A11)

Same result as MATCH here, but XMATCH also supports searching from the last item backwards and approximate-match modes MATCH doesn't handle as cleanly.

  • OFFSET - jump 4 rows down from A2:
=OFFSET(A2,4,0)

Lands on order 1006. Performance note: OFFSET recalculates every single time anything on the sheet changes, even in cells that have nothing to do with it. On a small tracker like this it's invisible; on a sheet with thousands of rows and several OFFSET formulas, it can noticeably slow things down. INDEX doesn't have this problem and can usually do the same job.

Text Formulas

  • CONCAT - combine rep and region into one label:
=CONCAT(C2," - ",B2)

"Priya Sharma - North."

  • TEXTJOIN - list the first three reps with a delimiter, skipping blanks automatically:
=TEXTJOIN(", ",TRUE,C2:C4)

"Priya Sharma, Aman Verma, Priya Sharma."

  • LEFT - pull the first 5 characters of a rep's name:
=LEFT(C2,5)

"Priya."

  • RIGHT - pull the last 5 characters:
=RIGHT(C2,5)

"harma."

  • MID - pull characters from the middle of a string:
=MID(C2,7,5)

Starting at character 7 for 5 characters: "Sharm."

  • LEN - character count, handy for spotting formatting issues:
=LEN(C2)

12 characters for "Priya Sharma."

  • TRIM - strip stray spaces (common when data is pasted from another system):
=TRIM(C2)

Won't visibly change "Priya Sharma" here, but run it on a column pasted from a CRM export and you'll often see LEN drop by a character or two - that's trailing whitespace you didn't know was there.

  • SUBSTITUTE - rename a status label without retyping the column:
=SUBSTITUTE(G2,"Pending","In Progress")

Date & Time Formulas

  • TODAY and NOW - current date, and current date plus time:
=TODAY()
=NOW()

Both update on their own every time the sheet recalculates - don't use them if you need a date to stay fixed once it's entered (use Ctrl+; to paste a static date instead).

  • DATE - build a date from separate year/month/day values, useful when those come from other cells or a form:
=DATE(2026,2,1)
  • DATEDIF - how many days old is order 1001:
=DATEDIF(F2,TODAY(),"D")

DATEDIF is genuinely undocumented in Excel's own function list, but it's stable and everyone uses it anyway - swap "D" for "M" or "Y" to get months or years instead of days.

  • YEAR and MONTH - pull just the year or month from an order date:
=YEAR(F2)
=MONTH(F2)

2026 and 1. This is how you'd build a "group by month" summary without touching a Pivot Table.

  • EOMONTH - last day of the month an order was placed:
=EOMONTH(F2,0)

31-Jan-2026. Change the 0 to 1 and you get the last day of the following month instead - useful for calculating a payment due date.

Error-Handling Formulas

  • IFERROR - look up an order that doesn't exist and show something readable instead of an error:
=IFERROR(VLOOKUP(9999,A2:H11,3,FALSE),"Order Not Found")
  • IFNA - the same idea, but only for #N/A specifically (other error types pass through untouched):
=IFNA(XLOOKUP(9999,A2:A11,C2:C11),"No Match")

Use IFNA instead of IFERROR when you specifically want to catch "not found" but still see a real error if something else goes wrong (like a #DIV/0! hiding somewhere it shouldn't).

  • ISERROR - just checks TRUE/FALSE, doesn't replace the value:
=ISERROR(VLOOKUP(9999,A2:H11,3,FALSE))
  • ISNA - same idea, but specifically for #N/A:
=ISNA(MATCH(9999,A2:A11,0))
  • ISNUMBER - confirm a Units cell is actually numeric and not text that looks numeric:
=ISNUMBER(D2)

This one catches a surprisingly common problem: numbers imported from another system (or typed with a stray space) that Excel treats as text. SUM and AVERAGE will silently skip those cells rather than erroring, so a wrong total is often the first sign something's wrong.

Statistical Formulas

  • MEDIAN - the middle order value, less skewed by the one big 16,200 order than AVERAGE is:
=MEDIAN(H2:H11)

5,050.

  • MODE - most common Units value:
=MODE(D2:D11)
  • STDEV - how spread out order values are:
=STDEV(H2:H11)

In current Excel, prefer STDEV.S for a sample (which this is - 10 orders out of presumably many more over time) or STDEV.P if this really is your entire population of orders. Plain STDEV still works but is the older, less explicit name for STDEV.S.

  • RANK - where order 1001 sits by value against all ten:
=RANK(H2,H2:H11)

5,400 ranks 6th out of 10.

  • PERCENTILE - the value at the 75th percentile of all orders:
=PERCENTILE(H2:H11,0.75)

Dynamic Array Formulas (Excel 365)

Note: FILTER, SORT, UNIQUE and LET need Excel 365 or Excel 2021+. On older versions these will show a #NAME? error instead.

  • FILTER - pull every delivered order as its own live table, no helper columns:
=FILTER(A2:H11,G2:G11="Delivered")

Add or change an order's status and this list updates on its own - it's the modern replacement for a manually maintained "Delivered only" tab.

  • SORT - the same range, ordered by Total (column H, the 8th column in the range) from highest to lowest:
=SORT(A2:H11,8,-1)
  • UNIQUE - the distinct list of regions:
=UNIQUE(B2:B11)

Returns North, South, East, West once each - useful as the source list for a dropdown or a summary table.

  • LET - name a calculation once and reuse it, so Excel isn't recalculating the same range twice - here, revenue per unit sold overall:
=LET(rev,SUM(H2:H11),units,SUM(D2:D11),rev/units)

On a small sheet the performance gain is invisible; on a heavy model with the same range referenced five times in one formula, LET can meaningfully speed things up and makes the formula readable besides.

Combining Formulas for Real Reports

Single formulas rarely do the whole job on their own - most real spreadsheets stack two or three together. Using the same tracker:

  • IF + AND - only pass orders that are both delivered and above 8,000:
=IF(AND(G2="Delivered",H2>=8000),"Priority Follow-up","Standard")
  • IF + XLOOKUP - only look up a rep's name if the order is actually delivered:
=IF(G2="Delivered",XLOOKUP(A2,A2:A11,C2:C11),"Not Applicable")
  • IFERROR + a calculation - average price per unit without a #DIV/0! if Units is ever zero:
=IFERROR(H2/D2,"Units Missing")

Formula-Based Conditional Formatting

Formulas aren't only for calculation cells - they can drive highlighting rules too. To flag every Pending order automatically:

  1. Select A2:H11.
  2. Home → Conditional Formatting → New Rule.
  3. Choose "Use a formula to determine which cells to format."
  4. Enter =$G2="Pending" and pick a fill color.

Because the reference is $G2 (column locked, row relative), the rule checks column G on whatever row each cell belongs to, so it correctly highlights entire rows rather than just column G itself.

New Excel Formulas in Microsoft 365

Microsoft has been shipping formulas faster than most "Excel formulas" guides get updated. Here are the ones actually worth knowing in 2026, still using our tracker.

  • TEXTSPLIT - break a rep's full name into first and last on the fly:
=TEXTSPLIT(C2," ")
  • TEXTBEFORE / TEXTAFTER - grab just the first or last name without a fixed character count:
=TEXTBEFORE(C2," ")
=TEXTAFTER(C2," ")
  • TAKE / DROP - preview the first 3 orders, or everything except the first 3:
=TAKE(A2:H11,3)
=DROP(A2:H11,3)
  • CHOOSECOLS / CHOOSEROWS - pull just Region and Total (columns B and H) into a mini report, or just specific rows:
=CHOOSECOLS(A2:H11,2,8)
=CHOOSEROWS(A2:H11,1,5,10)
  • HSTACK / VSTACK - combine ranges side by side or stacked, without copy-pasting:
=HSTACK(C2:C11,H2:H11)
  • REGEXEXTRACT - pull just the numeric part out of a mixed string, e.g. from a confirmation code like "ORD-1005-IN":
=REGEXEXTRACT("ORD-1005-IN","[0-9]+")

Returns "1005." This one alone can replace several nested MID/FIND formulas people used to build for exactly this kind of extraction.

  • GROUPBY - total revenue per region, without building a Pivot Table:
=GROUPBY(B2:B11,H2:H11,SUM)
  • PY - run actual Python inside a cell, for anything Excel's native functions don't cover well:
=PY("sum([5400,4960,4500,4500,9000,6200,2100,16200,4050,8680])")
  • IMPORTCSV / IMPORTTEXT - pull an external file's contents in and have it refresh automatically when the source changes:
=IMPORTCSV("orders.csv")
  • A caveat worth stating plainly: most of the formulas in this section only exist in Microsoft 365 with recent updates installed. If you're on Excel 2019, 2016, or a non-subscription version, several of these simply won't be available - that's not a settings problem, it's a licensing one.

Common Excel Formula Mistakes to Avoid

MistakeWhat HappensExampleFix
Wrong cell rangeResult silently excludes rows=SUM(H2:H10) when data runs to H11Convert the range to a Table so it expands automatically
Missing parenthesesWrong order of operations=D2*E2+100 vs. =D2*(E2+100)Always bracket the part you want calculated first
Dividing by zero#DIV/0! error=H2/D2 when Units is 0=IFERROR(H2/D2,"N/A")
Numbers stored as textSUM/AVERAGE quietly skips the cell"12" typed with a leading spaceCheck with ISNUMBER, then re-enter or use VALUE()
Relative vs. absolute referenceFormula shifts unexpectedly when copiedB2 instead of $B$2 in a rule meant to stay fixedLock with $ wherever the reference must not move
Lookup value not found#N/AVLOOKUP(9999,...) when 9999 doesn't existWrap in IFNA or IFERROR
Hidden trailing spacesLookups and matches fail silently"Delivered " vs. "Delivered"TRIM the source column

Learning Resources:

FAQ

Q1. What are the most important Excel formulas to learn first?

SUM, IF, VLOOKUP or XLOOKUP, COUNTIF, and IFERROR cover the majority of everyday spreadsheet work. Everything else in this guide builds on those five.

Q2. Should I learn VLOOKUP or XLOOKUP?

If you're on Microsoft 365 or Excel 2021+, learn XLOOKUP first - it's more flexible and less fragile when columns get inserted or removed. Learn VLOOKUP as well if you regularly work with files from people on older Excel versions.

Q3. Why does my formula return #N/A, #DIV/0!, or #VALUE!?

#N/A almost always means a lookup didn't find a match (check for typos or trailing spaces). #DIV/0! means you divided by an empty or zero cell. #VALUE! usually means a formula expected a number but found text. Wrap any formula prone to these in IFERROR or IFNA once you understand why it's happening - don't reach for IFERROR before you've diagnosed the actual cause.

Q4. How do I remove duplicate rows in Excel?

Select your range, go to Data → Remove Duplicates, choose which columns must match, and confirm. Keep a copy of the original data before doing this - it can't be undone once you close the file.

Q5. Do these dynamic array formulas (FILTER, SORT, UNIQUE, LET) work in older Excel?

No. They require Microsoft 365 or Excel 2021 and later. On Excel 2019 or older, they'll return a #NAME? error.

Q6. How many formulas does Excel actually have?

Somewhere north of 500 built-in functions as of the current Microsoft 365 release, and Microsoft keeps adding more. Realistically, the roughly 50 covered in this guide will handle almost all day-to-day spreadsheet work.

About the Author
Sanjay Prajapat
About the Author

Sanjay built his career managing digital campaigns for small and mid-sized businesses, running paid search accounts, optimizing landing pages, and tracking conversion funnels across industries. He tracks search and social algorithm updates by testing changes on live campaigns rather than assuming best practices stay static. His articles give marketers practical tactics to test the same week.

Drop Us a Query
Fields marked * are mandatory
×

Your Shopping Cart


Your shopping cart is empty.