DEV Community

DailyTech Hub
DailyTech Hub

Posted on AI-assisted

How to Build an Expense Report in Google Sheets With Receipt Checks and a Reimbursement Total

Expense reports come back for the same few reasons: a line with no receipt, a date outside the report period, a blank category. The total owed is also easy to get wrong when part of the spending went on a company card and part was covered by a cash advance.

This tutorial builds a sheet in Google Sheets that catches the first set before your approver does and works out the second. The layout is simplified, and the example is a made-up week of client visits.

1. Columns, header cells and dropdowns

Put these headers in row 1:

A B C D E F G
Date Description Category Paid with Receipt Amount Check

You type into A to F. G calculates. Rows 2 to 26 give you 25 lines. Put the report period beside the table: J1 is Period from and J2 is Period to, with labels in I1 and I2.

Add three dropdowns with Data > Data validation > Add rule:

  • C2:C26: Dropdown from a range, pointing at a list of categories on a second sheet.
  • D2:D26: Dropdown with two items, Personal funds and Company card.
  • E2:E26: Dropdown with two items, Yes and No.

Keep D and E to exactly those words. The totals count them by name.

2. One array formula for the Check column

In G2 only:

=ARRAYFORMULA(IF(F2:F26="", "", IF(A2:A26="", "No date", IF(((J1<>"")*(A2:A26<J1)+(J2<>"")*(A2:A26>J2))>0, "Date outside period", IF(E2:E26<>"Yes", "No receipt", IF(C2:C26="", "No category", ""))))))
Enter fullscreen mode Exit fullscreen mode

Only rows that have an amount get checked. The tests run in a fixed order and the first problem wins: No date, Date outside period, No receipt, No category. The two (J1<>"") guards skip the date test when a period cell is empty. Inside an array, multiplication and addition stand in for AND and OR, because those two functions squeeze a range into a single answer.

This is a rewrite of a per-row formula into one cell, so keep G3:G26 empty.

A line with several problems shows only the first one. A $5.00 line dated October 12 with no receipt and no category reads Date outside period until you fix the date.

3. Highlight flagged lines

Select A2:G26, open Format > Conditional formatting, and under "Format cells if" choose Custom formula is:

=$G2<>""
Enter fullscreen mode Exit fullscreen mode

Pick a light orange fill. The $ before G colors the whole row.

4. Total, card and advance

Labels go in I4:I9. Type the cash advance yourself in J6.

J4: =SUM(F2:F26)
J5: =-SUMIFS(F2:F26, D2:D26, "Company card")
J6: 100
J7: =ROUND(J4+J5-N(J6), 2)
J8: =IF(J4=0, "", IF(J7>0, "Owed to employee", IF(J7<0, "Employee owes company", "Settled")))
J9: =SUMPRODUCT(--(LEN(G2:G26)>0))
Enter fullscreen mode Exit fullscreen mode
  • J5 is negative, so J7 is a plain sum. The company already paid those lines, so they come off.
  • J7 rounds to cents before J8 tests it. This is a small addition to keep a settled report from reading as a tiny debt after floating-point sums.
  • J9 counts the flagged lines.

Here is the sample week of October 5 to 9, with the nine lines entered:

Line Paid with Receipt Amount Check
Round-trip flight Company card Yes 412.60
Hotel, 4 nights Company card Yes 596.00
Parking at client site Personal funds No 18.00 No receipt
Postage, dated 10/12 Personal funds Yes 9.60 Date outside period

The other five lines are 38.00, 74.35, 12.40, 23.15 and 31.80, all personal funds with receipts. The nine amounts add up to 1,215.90. The card took 412.60 + 596.00 = 1,008.60, leaving 207.30. The 100.00 advance comes off that, so J7 is 107.30 and J8 reads Owed to employee. J9 is 2.

The advance can also flip the result. With the same lines and a 300.00 advance, J7 is 207.30 - 300.00 = -92.70 and J8 reads Employee owes company.

5. Before you send it

  1. Look at J9. Fix each flagged line or write one line in your notes that explains it.
  2. Check J7 and J8 against what you paid yourself.
  3. Print the sheet or save a PDF, and attach receipts the way your employer asks.

If you want it ready-made

There is a free expense report template with the same Check column and totals, plus a Summary tab by category, how each expense was paid and receipt status, and note and approval lines. It comes as a Google Sheets copy or an .xlsx. The formulas above are enough to build your own.

What do your approvers send expense reports back for most often?

Top comments (0)