Spreadsheets

Spreadsheet Formulas Every Professional Should Know

Learn the essential spreadsheet formulas, from SUM and IF to SUMIFS and lookups, with copy-ready examples and small tables you can try on your own data.

Most day-to-day spreadsheet work comes down to about a dozen formulas: adding, averaging, counting, making decisions, summing by condition, looking things up and cleaning text. Learn these and you can handle nearly every report, budget and tracker you will meet. This guide shows each one with a small example you can copy.

The formulas below work in most spreadsheet apps. Where a function name or separator may differ, it is noted.

The sample data

Every example uses this small sales table, with headers in row 1 and data in rows 2 to 7:

A: RegionB: RepC: ProductD: AmountE: Date
2EastAnaBasic12002026-01-05
3WestBenPro24002026-01-09
4EastCaraPro18002026-01-12
5WestDevBasic9002026-01-14
6EastAnaPro21002026-01-20
7WestBenBasic10002026-01-25

Adding and averaging: SUM, AVERAGE, MIN, MAX

These four summarize a range of numbers.

=SUM(D2:D7)       total of all amounts: 9400
=AVERAGE(D2:D7)   mean amount: 1566.67
=MIN(D2:D7)       smallest: 900
=MAX(D2:D7)       largest: 2400

Use a range such as D2:D7 rather than listing cells one by one. If you later add rows inside the range, the result updates by itself.

Counting: COUNT, COUNTA, COUNTIFS

COUNT counts cells that hold numbers. COUNTA counts any non-empty cell, which is useful for counting rows of text. COUNTIFS counts rows that meet one or more conditions.

=COUNTA(B2:B7)                          rows with a rep: 6
=COUNTIFS(A2:A7,"East")                 East rows: 3
=COUNTIFS(A2:A7,"East",C2:C7,"Pro")     East and Pro: 2

Each condition is a pair: a range, then the criterion to test it against. Add as many pairs as you need.

Making decisions: the IF formula

IF tests a condition and returns one value if it is true and another if it is false.

=IF(D2>=2000,"Large","Standard")

For row 2 this returns Standard, because 1200 is below 2000. You can nest one IF inside another for three outcomes, but past two levels it gets hard to read. Combine tests with AND and OR instead:

=IF(AND(A2="East",D2>=1500),"Review","OK")

Summing by condition: SUMIFS

SUMIFS adds the numbers in one range for rows that meet your conditions. The range to add comes first, then condition pairs.

=SUMIFS(D2:D7,A2:A7,"East")                       East total: 5100
=SUMIFS(D2:D7,A2:A7,"West",C2:C7,"Basic")         West Basic: 1900
=SUMIFS(D2:D7,E2:E7,">="&DATE(2026,1,10))         from 10 January on: 5800

To avoid typing criteria into formulas, put them in cells and refer to them. If G1 holds East, then =SUMIFS(D2:D7,A2:A7,G1) gives the same answer, and you can change G1 to see another region. Related functions, SUMIF, AVERAGEIFS, MAXIFS and MINIFS, follow the same pattern, though availability can vary by app.

Looking things up: XLOOKUP, VLOOKUP, INDEX and MATCH

A lookup formula finds a value in one place and returns related information from another. Suppose a second table lists each rep and their manager in columns J and K.

=XLOOKUP(B2,J2:J10,K2:K10,"Not found")
=VLOOKUP(B2,J2:K10,2,FALSE)
=INDEX(K2:K10,MATCH(B2,J2:J10,0))

All three do the same job here. A few notes:

  • XLOOKUP is the cleanest, with a built-in not-found value, but older apps may not have it.
  • VLOOKUP needs the lookup value in the first column of the table, and the final FALSE means exact match. Leaving it out is a common source of wrong answers.
  • INDEX with MATCH works nearly everywhere and does not care which column the key sits in. The 0 in MATCH means exact match.

Cleaning text and dates: TRIM, TEXT, LEFT and friends

Imported data is rarely tidy. These help:

=TRIM(B2)                       removes extra spaces
=UPPER(B2)  =PROPER(B2)         changes capitalization
=LEFT(C2,3)                     first three characters
=TEXT(E2,"mmm yyyy")            shows Jan 2026
=B2&" - "&C2                    joins text: Ana - Basic

TEXT turns a number or date into display text using a format code. The result is text, so do not use it for further math. For a longer cleanup routine, see how to clean data in a spreadsheet.

Handling errors: IFERROR

IFERROR returns a fallback when a formula fails.

=IFERROR(D2/D3,0)

Use it sparingly. Hiding every error can also hide real problems, such as a lookup that quietly stopped matching. Fix the cause first, then wrap the formula if a blank or zero is genuinely the right result.

Habits that make formulas reliable

  • Lock fixed cells with dollar signs, as in $G$1, so they do not move when you copy a formula down.
  • Keep one row of headers and one kind of data per column.
  • Test a formula on a row you can check by hand before filling it down.
  • Write criteria in cells rather than burying them in formulas.

If you want somewhere to practice, Workbook is the spreadsheet app in Stacwise Work, and the same formulas apply. More habits are covered in spreadsheet best practices.

Key takeaways

  • A dozen formulas cover most professional spreadsheet work: SUM, AVERAGE, COUNTIFS, IF, SUMIFS, a lookup and a few text functions.
  • SUMIFS and COUNTIFS turn a flat list into a summary without any manual filtering.
  • Prefer XLOOKUP when available, and INDEX with MATCH when you need wide compatibility.
  • Put criteria in cells, lock references with dollar signs and check one row by hand.

Frequently asked questions

What is the most useful spreadsheet formula to learn first?

SUM is the first one everyone needs, but IF and SUMIFS give you the biggest jump in what you can do. Together they let you add things up and make decisions based on conditions.

Should I use XLOOKUP, VLOOKUP or INDEX/MATCH?

Use whichever your spreadsheet app supports. XLOOKUP is the simplest when it is available. INDEX with MATCH works almost everywhere and can look left as well as right, while VLOOKUP only looks to the right of the lookup column.

Why does my formula show an error instead of a result?

The most common causes are a lookup value that is not found, text where a number is expected, a divide by zero, or a range that is the wrong size. Check the cell the error names first, then wrap the formula in IFERROR only once you understand the cause.

Do these formulas work the same in every spreadsheet app?

Most do. A few function names or argument separators can differ, such as a semicolon instead of a comma between arguments, so check your app's function list if a formula is not recognized.