DEV Community

Robert Breen
Robert Breen

Posted on Originally published at ynteractive.com

Excel for the Web: Budget vs Actual With a Table, One Calculated Column and a Greater-Than-0 Rule

A budget-vs-actual sheet is the first spreadsheet most small businesses need, and the one most often built as a loose grid of cells with hand-typed totals. The moment someone inserts a row, a SUM range misses it.

This walkthrough builds it the sturdy way in Excel for the web, using a made-up bakery owner, Tom, whose bookkeeper asks every month where he went over budget. Five lines, and four Excel features that do the work for you:

  1. Format As Table, so ranges grow with the data.
  2. A calculated column that fills one formula down by itself.
  3. The Total Row, instead of hand-written SUMs.
  4. Conditional Formatting that turns overspending red.

Step 1: A workbook and the data

On the Excel start page (microsoft365.com), click Create blank workbook. New files are called "Book"; click the file name at the top and type Bakery budget, October, then press Enter. Excel for the web saves as you go, so there is no Save button to forget.

Click A1 and type the headers Category, Budget and Actual, then five rows: Rent, Ingredients, Wages, Utilities and Marketing with your numbers.

Type numbers without commas or a $ sign. You format them as money at the end; typed symbols can turn numbers into text.

Step 2: Make it a table

Click any cell in the data, then on the Home tab click Format As Table and pick a style (any one works). Excel proposes the range A1:C6. Check My table has headers is ticked and click OK.

Every header now has a filter arrow. More importantly, the table is a named object: formulas and totals that refer to it expand when you add rows.

Step 3: A Difference column that fills itself

Click D1, type Difference and press Enter. The table grows to include column D automatically.

In D2 type:

=C2-B2
Enter fullscreen mode Exit fullscreen mode

Actual minus budget, so a positive number means overspent. Press Enter. Because you are inside a table, Excel copies the formula down the whole column. This is a calculated column: one formula, applied to every row, including rows you add later.

Tom's column fills with:

Category Difference
Rent 0
Ingredients 360
Wages -150
Utilities 62
Marketing -120

The sign convention matters. Pick one (actual minus budget here), write it in the header or a note, and stick with it, or the red flags in Step 5 point the wrong way.

Step 4: Totals with the Total Row

With a cell in the table selected, open the Table Design tab (it only shows while you are in the table) and tick Total Row.

A Total row appears and already sums the last column: 152. Budget and Actual are empty. Click B7, click the small arrow next to it, and choose Sum. Do the same in C7. The menu also offers None, Average, Count, Max and Min.

Result: Budget 16450, Actual 16602, Difference 152, so the month came in $152 over.

Why not just type =SUM(B2:B6)? The Total Row uses SUBTOTAL over the table column, so it follows the table when rows are added and respects filters: filter to one category and the total shows just that category.

Step 5: Turn overspending red

Select the Difference cells D2:D6. On the Home tab click Conditional Formatting > Highlight Cell Rules > Greater Than...

In Excel for the web this opens a Conditional Formatting panel on the right, not a dialog. It already applies to D2:D6 and says Cell value, Greater than. Type 0 in the value box. The first format style (light red fill) is already picked. Click Done.

Ingredients (360) and Utilities (62) turn red. Wages and Marketing came in under, so they stay plain. The rule in plain terms:

Applies to: D2:D6
Rule:       Cell value > 0
Format:     light red fill
Enter fullscreen mode Exit fullscreen mode

Step 6: Format as money and share

Close the panel, select B2:D7, open the number format box (it says General) and choose Currency. Totals now read $16,450.00, $16,602.00 and $152.00.

Click Share at the top right, then Share (Copy Link makes a link with default access instead). Type your bookkeeper's email in Add a name, group, or email, click the eye button and choose Can edit (Can view only reads), then Send.

Checklist

  • [ ] Numbers typed without $ or commas
  • [ ] Data formatted as a table, range A1:C6, My table has headers ticked
  • [ ] =C2-B2 in D2 filled the whole column on its own
  • [ ] Sign convention: positive = over budget
  • [ ] Total Row on, with Sum chosen for Budget and Actual
  • [ ] Greater Than 0 rule on D2:D6 with light red fill
  • [ ] B2:D7 formatted as Currency
  • [ ] Shared with Can edit for the bookkeeper, Can view for everyone else

Where to go next

Once a sheet is a table, the same habits carry into everything else: filters that don't break totals, columns that fill themselves, and rules that flag problems instead of making someone scan for them.

The full lesson is a 26-step practice copy of the real Excel for the web screens that checks each click, with no Microsoft account needed: Excel for the Web: Your First Budget Spreadsheet.

Top comments (0)