Essential Spreadsheet Formulas and Functions to Cut Busywork

Most spreadsheet busywork is the same arithmetic, lookup or tidy-up repeated by hand every week. A small set of functions removes most of it: SUMIFS for totals by category, XLOOKUP or INDEX and MATCH for pulling data from another table, IF and IFERROR for decisions and clean outputs, and date functions for due dates and month-ends.

It ends with a worked invoice tracker you can rebuild step by step. Examples use Microsoft Excel 365 and Google Sheets, where function names are the same unless stated otherwise.

How a formula works

A formula starts with an equals sign, names a function, and passes arguments in brackets. Arguments are separated by commas in most English-language settings. The formula =SUM(B2:B20) asks for the total of cells B2 to B20.

Cell references are the part most people get wrong early on. A plain reference such as C2 shifts when you copy the formula. A reference written $C$2 stays fixed. A mixed reference such as $C2 fixes the column but lets the row move.

Suppose cell F1 holds a VAT rate and you want to multiply each net amount in column C by that rate. In D2 you write =C2*$F$1. When you copy it down to D3, the formula becomes =C3*$F$1. The C moves with the row, and $F$1 does not.

Named ranges replace references with labels. Naming the rate cell VAT_Rate lets you write =C2*VAT_Rate, which is easier to read six months later. Excel’s Name Box, next to the formula bar, sets names. Google Sheets uses Data, then Named ranges.

To check a formula you do not trust, step through it. Excel’s Evaluate Formula tool, under the Formulas tab, shows each part of the calculation in turn. Sheets has no equivalent, so split long formulas across helper cells while you test them.

Small Business Command Center

Skip the setup

Small Business Command Center

Clients, invoices, expenses and tasks in one workbook. A good fit if you run the business from a single file.

See it on Taskdale →

The functions to learn first

Learn these in roughly this order. Each one solves a task that comes up in almost every workbook.

Totals and counts

SUM adds a range. SUMIF adds values that meet one condition. SUMIFS adds values that meet several conditions. COUNTIF and COUNTIFS do the same for counting rows. AVERAGEIFS averages with conditions.

Assume column C holds categories, column E holds gross amounts, and column A holds invoice dates. To total gross spend on travel:

=SUMIFS(E:E, C:C, "Travel")

To add a date window, supply each condition as a pair:

=SUMIFS(E:E, C:C, "Travel", A:A, ">="&$K$2, A:A, "<="&$K$3)

The sum range always comes first in SUMIFS, which is the reverse of the order in SUMIF. Mixing them up is one of the most common errors covered below.

Decisions and clean outputs

IF returns one value when a condition is true and another when it is false. IFS tests several conditions in sequence without nesting. AND and OR combine conditions. IFERROR replaces an error with a value you choose.

A status column is the typical use:

=IF(F2<>"", "Paid", IF(TODAY()>E2, "Overdue", "Open"))

This reads: if a paid date exists, the invoice is paid; otherwise, if today is past the due date, it is overdue; otherwise, it is open.

IFERROR is useful for lookups that may legitimately fail, but it hides every error type, not only the one you expected. Use it around the specific lookup, not around whole calculations.

Lookups

A lookup pulls a value from one table into another based on a shared key, such as a supplier name or product code. Three approaches are in common use.

VLOOKUP is the oldest. It searches the first column of a range and returns a value from a column you specify by number:

=VLOOKUP(B2, Suppliers!$A$2:$B$100, 2, FALSE)

The final FALSE forces an exact match. Leave it out and the function defaults to approximate matching, which returns wrong results on unsorted data without warning. VLOOKUP can only look right, and its column number breaks silently if someone inserts a column in the lookup table.

INDEX and MATCH together do the same job without those limits:

=INDEX(Suppliers!$B$2:$B$100, MATCH(B2, Suppliers!$A$2:$A$100, 0))

MATCH finds the row number, and INDEX returns the value in that row from any column. The 0 forces an exact match.

XLOOKUP combines these in one function and adds a built-in “not found” value:

=XLOOKUP(B2, Suppliers!$A$2:$A$100, Suppliers!$B$2:$B$100, "Not listed")

For new workbooks in a current version of Excel or in Google Sheets, XLOOKUP is the simplest choice. The trade-offs are covered in the section on costs.

Text

TRIM removes leading, trailing and doubled spaces. CLEAN removes non-printing characters. LEFT, MID and RIGHT extract fragments. LEN counts characters. TEXT formats a number or date as text. TEXTJOIN combines many cells with a separator, skipping blanks if you ask it to.

Cleaning comes before matching. A supplier name exported with a trailing space will not match the same name typed cleanly, and the lookup returns “Not listed” for no visible reason. Wrapping the key in TRIM, as in XLOOKUP(TRIM(B2), ...), prevents most of these failures.

=TEXT(A2, "mmm yyyy") returns a label such as a month and year for a pivot-style summary. Format codes in TEXT depend on the language and regional settings of the workbook, which matters when files move between countries.

Dates

TODAY returns the current date. EOMONTH returns the last day of a month, offset by a number of months. NETWORKDAYS counts working days between two dates, excluding weekends and any holidays you list. WORKDAY returns the date a set number of working days after a start date.

Dates are stored as serial numbers, which is why you can add 30 to a date to get a date 30 days later:

=A2+30

Month-end reporting uses EOMONTH:

=EOMONTH(A2, 0) returns the last day of the month containing A2.

Working days, with a holiday list in a range called Holidays:

=NETWORKDAYS(A2, TODAY(), Holidays)

Both the start and end dates are included in the count.

Dynamic arrays

FILTER, UNIQUE and SORT return lists that resize themselves. UNIQUE(B2:B500) lists each supplier once. FILTER(A2:E500, C2:C500="Travel") returns every travel row. These functions are available in Excel 365, Excel 2021 and Google Sheets. They spill their results into neighbouring cells, so the cells below the formula must be empty.

Choosing the right function

Most choices come down to four questions: which version of the software the file will be opened in, how many conditions the calculation has, whether the result must be readable by someone else, and whether the data will grow.

The table below sets out the usual choices.

TaskPreferred functionUse the alternative whenAvoid when
Pull one value from another tableXLOOKUPThe file is opened in Excel 2016 or 2019 (use INDEX and MATCH)Writing new formulas in VLOOKUP
Total by one conditionSUMIFThe condition is a single criterion in a different sheet (SUMIF still works)Never, but SUMIFS is an equally good default
Total by several conditionsSUMIFSOnly one condition exists (SUMIF is simpler)Using SUMIF for multiple conditions with helper columns
Choose one result from severalIFSThe file must open in a version without IFS (use nested IF)Stacking more than three nested IF statements
Hide an expected errorIFERROR around one lookupYou need to see other errors (use IF with ISNA)Wrapping whole calculations
List unique valuesUNIQUEUsers need to slice the data interactively (use a pivot table)Feeding a pivot table that already does the job

A few rules make the table easier to apply.

  1. If the file will be shared with people on older software, use INDEX and MATCH and test the file in the oldest version you expect to see.
  2. If the logic has more than three branches, move the branches into a small lookup table. A table is easier to audit than a long nested formula.
  3. If a result will be checked by someone who did not build the file, prefer the function they can read at a glance.
  4. If you need to slice data by several dimensions, a pivot table is usually faster to build and maintain than a dense formula grid.

Worked example: an invoice tracker

This example builds a small tracker for supplier invoices. It calculates gross amounts, due dates, status, days overdue, and monthly totals. The figures are illustrative. Replace them with your own data.

The workbook has three sheets: Settings, Suppliers and Invoices.

Settings holds three labelled inputs:

  • B1: VAT rate, 20%
  • B2: Payment terms, 30 days
  • B3: Report start date, the first day of the month being reported

Suppliers holds a list of supplier names in column A and a default category in column B.

Invoices holds the transactions. Columns A to C are entered by hand. Columns D to I are formulas.

Follow these steps to build it.

  1. Create the three sheets and label the Settings inputs in column A, with values in column B. Name B1 VAT_Rate and B2 Terms_Days using the Name Box.
  2. On the Suppliers sheet, enter the supplier names in column A and their default categories in column B, starting in row 2.
  3. On the Invoices sheet, enter headings in row 1: Invoice date, Supplier, Net amount, Gross amount, Due date, Paid date, Category, Status, Days overdue.
  4. Enter the three hand-typed columns for each invoice. Use A for the invoice date, B for the supplier name, and C for the net amount.
  5. In D2, enter =C2*(1+VAT_Rate) to calculate the gross amount, and copy it down.
  6. In E2, enter =A2+Terms_Days to calculate the due date, and copy it down.
  7. Enter paid dates in column F when payment is received. Leave the cell empty otherwise.
  8. In G2, enter =XLOOKUP(TRIM(B2), Suppliers!$A$2:$A$100, Suppliers!$B$2:$B$100, "Check supplier"), and copy it down.
  9. In H2, enter =IF(F2<>"", "Paid", IF(TODAY()>E2, "Overdue", "Open")), and copy it down.
  10. In I2, enter =IF(H2="Overdue", TODAY()-E2, ""), and copy it down.
  11. Convert the range to an Excel table with Ctrl+T, or format it as a table in Google Sheets, so that new rows inherit the formulas automatically.
  12. On the Settings sheet, build the summary in rows 5 to 7.

The summary formulas are below. Column ranges run to row 500 so that new invoices are included without editing the formulas.

  • Gross value of unpaid invoices: =SUMIFS(Invoices!$D$2:$D$500, Invoices!$H$2:$H$500, "Open") + SUMIFS(Invoices!$D$2:$D$500, Invoices!$H$2:$H$500, "Overdue")
  • Gross value invoiced in the reporting month: =SUMIFS(Invoices!$D$2:$D$500, Invoices!$A$2:$A$500, ">="&$B$3, Invoices!$A$2:$A$500, "<="&EOMONTH($B$3, 0))
  • Count of overdue invoices: =COUNTIF(Invoices!$H$2:$H$500, "Overdue")

Sample data shows how the logic behaves. Suppose the tracker holds three invoices.

InvoiceSupplierNetGross (20% VAT)Due datePaid dateStatus
INV-101Northgate Print Ltd1,200.001,440.00Invoice date plus 30EnteredPaid
INV-102Lowmoor Cleaning350.00420.0014 days agoEmptyOverdue (14 days)
INV-103Brightwater Software780.00936.0016 days aheadEmptyOpen

The unpaid gross value is 420.00 plus 936.00, which is 1,356.00. The overdue count is 1. These results change each day, because TODAY is volatile and the status moves from Open to Overdue on the due date.

Test the build before using it. Add one invoice with a known net amount, check the gross, due date and status by hand, then delete it. Enter a supplier name with a trailing space to confirm that TRIM catches it. Enter a date in the wrong format and confirm that the due date formula returns an error rather than a wrong date.

DayDeck Task Tracker

Ready-made template

DayDeck Task Tracker

Daily and weekly tasks with priorities, due dates and colour cues for anything overdue.

See it on Taskdale →

Checklist before relying on a workbook

Use this list before a workbook feeds a report, a payment run or a decision.

  • Every input is in a labelled cell, and no formula contains a hard-coded rate, date or threshold.
  • Each lookup uses an exact match, and each lookup key is cleaned with TRIM where the source is typed or pasted.
  • Amounts and dates are numbers and dates, not text. Alignment is a quick check.
  • Every range in a SUMIFS or COUNTIFS formula is the same length.
  • At least one result has been calculated by hand and matched.
  • The file opens without #NAME? errors in the oldest version of the software that will be used.
  • IFERROR wraps only the lookups it is meant to protect.
  • A second person has read the formulas, or the logic is written in a short note inside the workbook.

Frequently asked questions

Should I still learn VLOOKUP?

Yes, for reading older files. Most inherited workbooks use it, and you will need to understand it to change those files safely. For new work, prefer XLOOKUP where it is available, or INDEX and MATCH where it is not.

Is XLOOKUP always better than INDEX and MATCH?

No. XLOOKUP is shorter and handles missing values more cleanly, but it is not available in older versions of Excel. INDEX and MATCH works everywhere and is equally accurate when written correctly. The right choice depends on who opens the file.

Do I need VBA or macros for these tasks?

Not for anything in this guide. Every task here can be done with functions alone. Macros become useful when a process involves steps that functions cannot perform, such as sending emails or reformatting several files in sequence. Add them only after the formula logic is correct and documented.

Where to start

Start with the function that removes the most manual work in your current workbook. For most people that is SUMIFS, followed by a single lookup, followed by a date calculation. Build one small workbook with those three, check it against figures you have calculated by hand, and only then add the next function. A short, correct workbook with clearly labelled inputs will save more time than a large one nobody dares to edit.

Lapis Ledger Annual Budget

Get the finished file

Lapis Ledger Annual Budget

Monthly and annual budget tabs for Excel and Google Sheets, with category totals that add themselves up.

See it on Taskdale →

Scroll to Top