Skip to content
Home » Blog » How to Write Your First Formula in Excel

How to Write Your First Formula in Excel

Writing your first formula in Excel feels intimidating until it clicks — and when it does, everything changes. A spreadsheet stops being a grid you type into manually and starts being something that calculates, updates, and checks for problems on its own.

Every formula in this guide works in Excel 2016 and all later versions, including Microsoft 365. IFERROR, used in the error-handling examples, has been available since Excel 2007. You don’t need prior experience — just a spreadsheet open and a willingness to type that first equals sign.

All examples come from a real dataset: NexaCorp Store’s 2024 monthly income and expense tracker. Twelve months of revenue, costs, salaries, rent, and profit — built from scratch using the exact formulas you’ll follow here.

Quick Takeaways:

  • Every formula must start with = — without it, Excel shows your entry as text, not a result.
  • Reference cells (like B5) instead of typing numbers directly; formulas that use cell references update automatically when your data changes.
  • Five formulas — SUM, basic arithmetic, AVERAGE, MAX/MIN, and IF — handle the bulk of everyday spreadsheet work.
  • The most common first-timer mistakes aren’t formula logic errors; they’re typing habits: a space before =, a comma inside a number, or a currency symbol stored inside a cell.
  • NexaCorp’s tracker produced GHS 307,600 in annual revenue and GHS 66,342.50 in net profit — all calculated with the formulas below.

The One Rule That Changes Everything

Every Excel formula starts with an equals sign. That character alone is what separates a formula from plain text.

Type SUM(B5:B16) in a cell and Excel displays it literally, as text. Type =SUM(B5:B16) and it returns GHS 307,600 — NexaCorp’s total revenue across all 12 months of 2024. The = is the trigger that tells Excel to calculate rather than display.

Cell References Beat Typing Numbers

You could write every January expense as a hardcoded formula: =7400+4200+1800+380+850+340+280. It returns 15,250. Correct — for now. Change any expense figure next month and the formula still shows the old number.

Write =SUM(C5:I5) instead. Now the formula points to the actual cells. Update any expense and the total updates instantly. That’s the habit worth building from day one: reference cells, don’t type values.

Writing Your First 5 Formulas

These five formulas built NexaCorp’s entire tracker. Start with the simplest and work down.

1. SUM — Total a Range in One Step

NexaCorp tracks seven expense categories per month: Cost of Goods, Salaries, Rent, Utilities, Marketing, Transport, and Miscellaneous. Rather than add each column individually, one SUM covers all of them:

=SUM(C5:I5)

For January, this returns GHS 15,250. For December — the busiest month — it returns GHS 25,020. Same formula, different row.

For the annual total, extend the range across all 12 months: =SUM(B5:B16) across the Revenue column gives GHS 307,600.

2. Arithmetic Operators — Subtract, Divide, Multiply

Once SUM fills the Total Expenses column, Gross Profit is a subtraction:

=B5-J5

January: GHS 18,500 minus GHS 15,250 = GHS 3,250 gross profit. December: GHS 35,600 minus GHS 25,020 = GHS 10,580. The formula is identical; only the row changes.

Profit Margin is a division, and it’s one of the most revealing formulas in any business tracker:

=K5/B5

January’s margin comes out at 17.6%. NexaCorp’s full-year average was 24.7%. That single figure tells you more about health than revenue alone.

Tax is multiplication. At 15%, the formula is:

=K5*0.15

January tax: GHS 487.50. December tax: GHS 1,587. Then Net Profit drops out with one more subtraction — =K5-M5 — giving you the after-tax result. January ends at GHS 2,762.50; December at GHS 8,993.

3. AVERAGE — Find the Baseline

=AVERAGE(B5:B16)

NexaCorp’s average monthly revenue was GHS 25,633. That number becomes your benchmark: any month below it warrants a closer look at what held it back.

In my experience, AVERAGE gets underused. Most people SUM everything and stop there. But an average gives you the context to spot whether a good month was genuinely strong or just average wearing a costume.

4. MAX and MIN — Spot the Best and Worst Instantly

=MAX(B5:B16)   →  GHS 35,600  (December)

=MIN(B5:B16)   →  GHS 18,500  (January)

December outperformed January by nearly GHS 17,100 in revenue. That gap points directly at where a business should focus: understand what drove December, then understand what constrained January.

These formulas work on any column. Swap B for N (Net Profit) and you get the highest and lowest profit months just as quickly.

5. IF — Flag Results Automatically

IF checks a condition and returns one of two values based on whether it’s true or false:

=IF(K5>0, “Profit”, “Loss”)

For every month in NexaCorp’s 2024 data, this returns “Profit.” All 12 months were profitable. But the formula earns its place in any real dataset — the moment a month slips into loss, it flags automatically. No manual scanning required.

7 Mistakes That Catch First-Time Formula Writers

None of these are logic errors. They’re typing habits — and once you know them, they won’t catch you again.

MistakeWhat Excel ShowsFix
No = signFormula text, not resultStart every formula with =
Space before =Same as aboveDelete the leading space (F2 → Home key)
Misspelled function (=SUUM)#NAME? errorUse autocomplete; press Tab to select
Dividing by zero or blank cell#DIV/0! error=IFERROR(K5/B5, 0)
Typing 4,200 GHS inside a cell#VALUE! in SUMStore plain numbers; format cells separately
Typing 1,500 with a commaTreated as text by SUMType 1500, use Ctrl+1 for formatting
Deleting a row a formula references#REF! errorCtrl+Z to undo, or rebuild the formula

The comma-in-numbers mistake gets almost everyone once. You type 1,500 expecting a number. Excel stores it as the text string “1,500” — left-aligned, and completely invisible to SUM and AVERAGE. The total comes out wrong and you can’t find why. Type 1500 instead and let number formatting handle the display.

One Habit Worth Building Right Now

After writing any formula, press F2 to re-enter edit mode. Excel colour-codes every cell reference in the formula, highlighting the exact ranges it’s calculating. If the highlighted area doesn’t match what you intended, fix it before pressing Enter.

It takes two seconds. It catches wrong ranges — one of the most common formula mistakes — before they create problems downstream.

Where to Go From Here

You now have five working formulas, an understanding of how cell references work, and a clear list of what to avoid. That’s enough to build a functional monthly tracker from scratch.

When you’re ready to go further, Microsoft’s complete Excel functions reference documents every function in detail. Leila Gharani’s Excel YouTube channel is one of the most practical video resources available. 

Pick one formula from this guide, apply it to data you actually care about, and see what it returns. That first correct result is the moment Excel starts working for you rather than the other way around.

Learn more Here: