Microsoft Excel 2024 Comprehensive Course — Beginner to Intermediate
X
Excel 2024 Microsoft 365
📗 34 Modules Foundations Data Entry Formatting Formulas Functions Charts Pivot Tables Data Analysis Protection Automation

🔢 Module 12: Formulas — The 4 Major Calculation Methods

Formulas are the heart of Excel. Without them, a spreadsheet is just a table of static numbers. With them, it becomes a living calculation engine that instantly recalculates when data changes. This module covers what a formula is, how Excel processes it, every arithmetic operator, operator precedence (the order of calculation), and the four main methods used to enter and build formulas: manual entry, AutoSum, the Insert Function wizard, and the Formulas tab. Every module from here onwards builds on these foundations.

12.1 What Is a Formula?

A formula is an instruction that tells Excel to calculate a result. Every formula in Excel follows the same rules:

  • Formulas always begin with an equals sign (=). If you forget the equals sign, Excel treats your entry as text.
  • Formulas can contain values (numbers typed directly), cell references (pointing to other cells), operators (+ − * /), and functions (built-in named calculations like SUM, AVERAGE, IF)
  • The cell displays the result of the formula — to see the formula itself, click the cell and look at the Formula Bar
  • Formulas recalculate automatically when any cell they reference changes (unless calculation mode is set to Manual — see Module 2)

Formula vs Value vs Text

EntryExcel Sees It AsCell Displays
1500A numeric value (number)1500 (right-aligned)
Total RevenueTextTotal Revenue (left-aligned)
=1500A formula (evaluates to 1500)1500 (right-aligned)
=A1+B1A formula referencing cells A1 and B1The sum of A1 and B1
=SUM(A1:A10)A formula using a functionThe total of cells A1 through A10

12.2 Arithmetic Operators

Operators tell Excel what calculation to perform between values or cell references. Excel uses the following arithmetic operators:

OperatorOperationExampleResult
+Addition=A1+B1   or   =500+300Sum of the two values
Subtraction=A1-B1   or   =1000-250Difference of the two values
*Multiplication=A1*B1   or   =150*12Product of the two values
/Division=A1/B1   or   =3600/12Quotient of the two values
^Exponentiation (power)=A1^2   or   =2^10Value raised to a power (A1 squared; 2 to the power 10 = 1024)
%Percentage=A1*15%15% of the value in A1 (same as =A1*0.15)
&Concatenation (join text)=A1&" "&B1Joins the text in A1 and B1 with a space between (e.g., "John" & " " & "Smith" = "John Smith")

Comparison Operators

Comparison operators return TRUE or FALSE and are used in IF functions and logical tests:

OperatorMeaningExample
=Equal to=A1=100 → TRUE if A1 is exactly 100
<>Not equal to=A1<>0 → TRUE if A1 is anything except 0
>Greater than=A1>50000 → TRUE if A1 exceeds 50,000
<Less than=A1<0 → TRUE if A1 is negative
>=Greater than or equal to=A1>=18 → TRUE if A1 is 18 or more
<=Less than or equal to=A1<=100 → TRUE if A1 is 100 or less

12.3 Operator Precedence — The Order of Calculation

When a formula contains multiple operators, Excel does not calculate from left to right. It follows a strict order of precedence. Getting this wrong is one of the most common causes of incorrect formula results.

The Order of Precedence (Highest First)

PriorityOperatorOperation
1 (highest)( )Parentheses (brackets) — calculated first, innermost first
2^Exponentiation (power)
3 (negative sign)Unary minus (negating a number, e.g., −5)
4%Percentage
5* /Multiplication and Division (equal priority, left to right)
6+ −Addition and Subtraction (equal priority, left to right)
7&Text concatenation
8 (lowest)= < > <= >= <>Comparison operators

Precedence Examples — Common Mistakes

FormulaExcel CalculatesResultCommon Mistake
=2+3*4 3*4=12 first, then 2+12 14 Expecting 20 (left to right). Multiplication has higher precedence than addition.
=(2+3)*4 2+3=5 first (brackets), then 5*4 20 Parentheses force addition first — use brackets to control the order
=10-2*3 2*3=6 first, then 10-6 4 Expecting 24 (10-2=8, then 8*3=24). Add brackets if that is the intent: =(10-2)*3
=A1+B1/C1 B1/C1 first, then A1+result A1 + (B1/C1) If you want (A1+B1)/C1, you must write: =(A1+B1)/C1
=-2^2 2^2=4 first, then −4 −4 Expecting 4. Exponentiation before negation. Write =(-2)^2 to get 4.
The Golden Rule: When in doubt about operator precedence, use parentheses. Extra brackets never hurt — they make your intent explicit and prevent calculation errors. =(A1+B1)/(C1+D1) is always clearer than relying on precedence rules.

12.4 Method 1 — Manual Formula Entry

Manual entry is the most direct way to write a formula — you type it yourself, character by character. It requires knowing the formula syntax but gives you full control.

Step-by-Step: Entering a Formula Manually

  1. Click the cell where you want the result to appear
  2. Type = (the equals sign — this tells Excel what follows is a formula)
  3. Type or click the first element (a number, a cell reference, or a function name)
  4. Type an operator (+ - * /)
  5. Type or click the next element
  6. Continue building the formula
  7. Press Enter to confirm — the result appears in the cell; the formula appears in the Formula Bar

Clicking to Enter Cell References (Point Mode)

Instead of typing cell addresses (e.g., A1, B5), you can click the cells after typing the equals sign or an operator. Excel enters the cell address automatically. This is called Point Mode and reduces typing errors:

  1. Click cell C1 (where the result will go)
  2. Type =
  3. Click cell A1 — Excel enters A1 in the formula and highlights A1 with a coloured border
  4. Type +
  5. Click cell B1 — Excel enters B1
  6. Press Enter — C1 now shows the sum of A1 and B1

Using Click-and-Drag to Enter a Range

  1. Type =SUM(
  2. Click the first cell of the range (e.g., A1) → drag to the last cell (e.g., A10) — Excel enters A1:A10
  3. Type ) to close the function → press Enter

IntelliSense — Formula AutoComplete

As you type a formula, Excel's IntelliSense displays a dropdown of matching function names and a tooltip explaining each one:

  • Type =SU → Excel shows a dropdown: SUM, SUMIF, SUMIFS, SUMPRODUCT, SUBSTITUTE…
  • Use the arrow key to highlight the function you want → press Tab to accept it
  • After the opening bracket, a tooltip shows the function's arguments: e.g., SUM(number1, [number2], …)

Colour-Coded Cell References

When editing a formula (in Edit Mode — F2 or double-click), Excel colour-codes each cell reference and its corresponding cell with the same colour. This makes it easy to visually verify which cells the formula is referencing:

  • =A1+B1 → A1 is highlighted in blue, B1 in green (colours vary per formula)
  • You can drag the coloured borders around cells to change the reference in the formula

Practical Formula Examples

TaskFormula
Add two cells=A1+B1
Subtract=A1-B1
Multiply (e.g., units × price)=B2*C2
Divide (e.g., total ÷ months)=D2/12
Calculate VAT (15% of price)=B2*15%  or  =B2*0.15
Price including VAT=B2*1.15  or  =B2+(B2*15%)
Average of three cells=(A1+B1+C1)/3
Gross profit margin=(B2-C2)/B2  (format result as %)
Annual salary from monthly=B2*12
Join first and last name=A2&" "&B2
Compound interest (simplified)=P*(1+r)^n  (where P, r, n are cell references)

12.5 Method 2 — AutoSum (Σ)

AutoSum is Excel's one-click formula tool. It automatically detects adjacent data and inserts the most appropriate formula — usually SUM — with the range already filled in. It is the fastest way to sum a column or row.

Using AutoSum

  1. Click the cell directly below a column of numbers (or to the right of a row of numbers) — where you want the total to appear
  2. Press Alt+= (the AutoSum shortcut — memorise this)
  3. Excel detects the adjacent numbers and proposes a range (shown with a moving dashed border). Review the proposed range — if it is correct, press Enter to accept; if not, click and drag to select the correct range before pressing Enter.
  4. — or — Home → Editing group → AutoSum (Σ) button
  5. — or — Formulas tab → Function Library group → AutoSum (Σ) dropdown

AutoSum for Multiple Totals at Once

  1. Select the entire blank row or column below/to the right of the data where all totals should appear (e.g., select B11:F11 to total 5 columns at once)
  2. Press Alt+=
  3. All five SUM formulas are inserted simultaneously, each summing the column above it

AutoSum Dropdown — Other Functions

The AutoSum button has a dropdown arrow ▼ that reveals additional one-click functions:

OptionFunction InsertedWhat It Calculates
Sum ★=SUM(A1:A10)Total of the range
Average=AVERAGE(A1:A10)Mean value of the range
Count Numbers=COUNT(A1:A10)Number of cells containing numeric values
Max=MAX(A1:A10)The largest value in the range
Min=MIN(A1:A10)The smallest value in the range
More Functions…Opens Insert Function dialogAccess to all Excel functions
AutoSum Tip: Alt+= is one of the most valuable keyboard shortcuts in Excel. Press it after entering a column of numbers to instantly total it — faster than any other method. Practice until it is instinctive.

12.6 Method 3 — The Insert Function Wizard

The Insert Function wizard (also called the Function Arguments dialog) guides you through entering any Excel function step by step, with descriptions of each argument and a live preview of the result. It is the best method when you know roughly what you want to do but are not sure of the exact syntax.

Opening Insert Function

  • Click the fx button to the left of the Formula Bar — the fastest method
  • Formulas tab → Function Library group → Insert Function
  • Press Shift+F3

Using the Insert Function Dialog

  1. The dialog opens with a search box and a category dropdown
  2. Search for a function: type a description of what you want to do (e.g., "count cells with text") → click Go → Excel suggests matching functions
  3. — or — Browse by category: use the "Or select a category" dropdown → choose: All (full list), Most Recently Used, Financial, Date & Time, Math & Trig, Statistical, Lookup & Reference, Database, Text, Logical, Information, Engineering, Cube, Compatibility, Web
  4. Click a function name in the list → the bottom of the dialog shows a description of what the function does
  5. Click OK → the Function Arguments dialog opens

The Function Arguments Dialog

  1. Each argument (input) the function needs is shown as a labelled field
  2. Click in an argument field → then click cells or type values to fill it
  3. To the right of each field: the current value of that argument is shown in blue
  4. Below the fields: a description of the currently selected argument in plain English
  5. Bottom of dialog: "Formula result =" shows a live preview of what the function returns with the current inputs
  6. Click OK to insert the completed formula into the cell
Example — Inserting COUNTIF via the Wizard:

1. Click cell D1 → click fx
2. Search: "count" → Go → select COUNTIF → OK
3. Function Arguments dialog opens:
   • Range field: click and select A1:A100 (the cells to check)
   • Criteria field: type "Johannesburg" (the condition to count)
   • Formula result: shows the count immediately
4. Click OK → formula =COUNTIF(A1:A100,"Johannesburg") is inserted in D1

When to Use the Wizard

  • When you are learning a new function and need to see argument descriptions
  • When a function has many optional arguments (e.g., VLOOKUP, SUMIFS, PMT)
  • When you want to verify the result before committing to the formula
  • When searching for a function by description rather than name

12.7 Method 4 — The Formulas Tab

The Formulas tab is the dedicated formula control centre of Excel. It organises all built-in functions by category and provides auditing, naming, and calculation management tools.

The Formulas Tab Groups

GroupKey ToolsUse For
Function Library Insert Function, AutoSum, Recently Used, Financial, Logical, Text, Date & Time, Lookup & Reference, Math & Trig, More Functions (Statistical, Engineering, Cube, Information, Compatibility, Web) Browsing and inserting functions by category — click any category button to see a list of functions in that group. Click any function name to open the Function Arguments dialog for that function.
Defined Names Name Manager, Define Name, Use in Formula, Create from Selection Creating and managing named ranges — e.g., naming B2:B50 "Salaries" so you can write =SUM(Salaries) instead of =SUM(B2:B50). (Covered in Module 14)
Formula Auditing Trace Precedents, Trace Dependents, Remove Arrows, Show Formulas, Error Checking, Evaluate Formula, Watch Window Debugging formulas — tracing which cells feed into a formula, finding errors, stepping through a formula's calculation sequence
Calculation Calculation Options (Automatic / Manual), Calculate Now (F9), Calculate Sheet (Shift+F9) Controlling when formulas recalculate; forcing a manual recalculation in large workbooks

Using the Function Library to Insert a Function

  1. Click the cell where you want the result
  2. Formulas tab → Function Library group → click a category button (e.g., Financial)
  3. A dropdown list of all functions in that category appears
  4. Hover over any function name → a tooltip shows a brief description
  5. Click the function name → the Function Arguments dialog opens → fill in the arguments → OK

Formula Auditing — Trace Precedents & Dependents

  • Trace Precedents: click a cell with a formula → Formulas → Trace Precedents. Blue arrows appear pointing from the source cells (that the formula uses) to the formula cell. Shows you what feeds into a formula.
  • Trace Dependents: click a data cell → Formulas → Trace Dependents. Blue arrows show which formula cells reference this cell. Shows you what uses a particular cell's value.
  • Remove Arrows: clears all auditing arrows from the sheet
  • Evaluate Formula: steps through the calculation of a formula one operation at a time — invaluable for debugging complex nested formulas

Show Formulas Mode

  • Formulas tab → Formula Auditing → Show Formulas — or press Ctrl+` (backtick)
  • All cells switch to displaying the raw formula text instead of calculated values
  • Useful for auditing a sheet — you can see all formulas at once and identify any cells that should have formulas but contain static values instead
  • Press again to return to normal display

12.8 Function Syntax — Understanding Arguments

Every Excel function follows the same syntax structure. Understanding it means you can read and write any function correctly.

= FUNCTION_NAME ( argument1 , argument2 , [optional_argument] )

  ┌─────────────────↑─────────────────┐
  │ Arguments are separated by commas   │
  └───────────────────────────────────┘
TermMeaningExample
Function NameThe name of the built-in calculation to perform — always uppercase by convention but not case-sensitiveSUM, AVERAGE, IF, VLOOKUP
Opening bracketOpens the argument list — must always follow the function name with no spaceSUM(
Arguments (required)The inputs the function needs to calculate its result. Shown in the syntax tooltip without brackets.VLOOKUP(lookup_value, table_array, col_index_num, ...)
Arguments [optional]Arguments shown in square brackets in the syntax tooltip are optional — the function works without them, using default valuesVLOOKUP(lookup_value, table_array, col_index_num, [range_lookup])
Comma separatorSeparates each argument from the next. In some regional settings (e.g., some SA Windows configurations), the separator may be a semicolon (;) instead of a comma.=IF(A1>0 , "Positive" , "Zero or negative")
Closing bracketCloses the argument list. Every opening bracket must have a matching closing bracket — mismatched brackets are a common error.SUM(A1:A10)
Nested functionsA function used as an argument inside another function. Excel evaluates the innermost function first.=ROUND(AVERAGE(A1:A10), 2) — AVERAGE is calculated first, then ROUND is applied to the result

Common Argument Types

Argument TypeWhat to EnterExamples
NumberA numeric value or cell reference containing a number100, A1, B2*1.15
RangeA colon-separated cell rangeA1:A100, B2:F50
Text (string)Text enclosed in double quotation marks"Cape Town", "Yes", ">0"
Logical (TRUE/FALSE)The value TRUE or FALSE, or a comparison that produces TRUE/FALSETRUE, FALSE, A1>0

12.9 Common Formula Errors & What They Mean

ErrorMeaningCommon CauseFix
#DIV/0! Division by zero The denominator in a division formula is 0 or blank Wrap with IFERROR: =IFERROR(A1/B1, 0) or =IF(B1=0, 0, A1/B1)
#VALUE! Wrong data type in formula Trying to add text to a number; a cell that looks like a number but is stored as text Check all referenced cells contain the correct data type. Use VALUE() to convert text-numbers.
#REF! Invalid cell reference A cell the formula referenced has been deleted; a formula was copied to a position that makes a relative reference point outside the sheet Ctrl+Z to undo deletion if possible. Otherwise, update the formula reference manually.
#NAME? Unrecognised name in formula Misspelled function name (e.g., =SUUM); text not in quotation marks; named range that does not exist; function not available in this Excel version Check spelling; add quotation marks around text arguments; verify the named range exists in Name Manager
#N/A Value not available VLOOKUP or MATCH cannot find the lookup value in the search range; exact match required but value does not exist in the table Verify the lookup value exists in the table. Wrap with IFERROR: =IFERROR(VLOOKUP(...), "Not found")
#NULL! Empty intersection Two ranges specified with a space (intersection operator) do not overlap: =SUM(A1:A10 C1:C10) Use a comma instead of a space: =SUM(A1:A10, C1:C10)
#NUM! Invalid numeric value A formula produces a number too large or too small for Excel; square root of a negative number; an iterative function that cannot converge Check inputs are within valid ranges (e.g., SQRT requires a non-negative number)
####### Column too narrow The column is too narrow to display the formatted value (common with dates and currency) Double-click the column border to AutoFit, or drag the border to widen the column

12.10 Quick Self-Check

Q1: What result does =4+3*2 return, and why? Write the corrected formula if you wanted the result to be 14.

✓ =4+3*2 returns 10. Multiplication (*) has higher precedence than addition (+), so Excel calculates 3*2=6 first, then 4+6=10. It does NOT calculate left to right as 4+3=7, then 7*2=14. To get 14: write =(4+3)*2. Parentheses force the addition to happen first: 4+3=7, then 7*2=14.

Q2: You have a column of monthly salaries in B2:B51 (50 employees). You want the total in B52. Write the formula using two different methods and state which is faster.

✓ Method 1 (Manual): click B52 → type =SUM(B2:B51) → Enter. Method 2 (AutoSum): click B52 → press Alt+= → verify the proposed range (B2:B51) → press Enter. Both formulas are identical. AutoSum is faster because Excel detects the range automatically — you do not need to type the range address. For a single total column, Alt+= takes about 2 seconds.

Q3: A cell shows #NAME?. Looking at the formula, you see =SUIM(A1:A10). What is the cause and the fix?

✓ The function name is misspelled — "SUIM" does not exist in Excel. #NAME? always indicates Excel cannot recognise something in the formula, most commonly a misspelled function name. Fix: click the cell → press F2 to enter edit mode → correct "SUIM" to "SUM" → press Enter. The formula becomes =SUM(A1:A10) and returns the correct total.

Q4: You want to calculate a price including 15% VAT. Cell B2 contains the VAT-exclusive price. Write three different formulas that all produce the correct VAT-inclusive result.

✓ All three produce the same VAT-inclusive price: (1) =B2*1.15 — multiplies price by 1.15 (100% + 15% = 115%). (2) =B2+B2*15% — adds 15% of the price to the original price. (3) =B2+(B2*0.15) — explicitly calculates 15% as 0.15 and adds it. Method 1 is the most concise and professional. Method 2 and 3 are more readable for beginners. If B2 = R100, all three return R115.

Q5: Explain the difference between using the Insert Function wizard (fx button) and typing a function manually. In what situations would you choose each?

✓ The Insert Function wizard (fx) guides you through entering a function step by step: it lets you search for functions by description, shows you exactly what each argument means, lets you click cells for ranges, and shows a live preview of the result before you commit. It also shows which arguments are required vs optional. Choose the wizard when: you are learning a new function, the function has many arguments (VLOOKUP, SUMIFS, PMT), you want to verify the result before confirming, or you cannot remember the exact argument order. Manual typing is faster when you know the function syntax well — experienced users type =VLOOKUP(A2,$F$2:$G$100,2,0) directly without the wizard because it is faster than navigating dialog boxes. For frequently used functions (SUM, AVERAGE, IF), manual typing is almost always faster.

Q6: A cell shows #DIV/0! because the formula =A1/B1 divides by B1 which is currently 0. You want the cell to show 0 instead of the error. How do you modify the formula?

✓ Two approaches: (1) IFERROR wrapper: =IFERROR(A1/B1, 0). IFERROR checks if the formula produces any error — if it does, it returns the second argument (0 in this case); if no error, it returns the formula result normally. (2) IF check: =IF(B1=0, 0, A1/B1). This explicitly checks if B1 is zero before dividing — if zero, returns 0; otherwise performs the division. IFERROR is more concise. The IF approach is more explicit and clear. Both are valid; use IFERROR when you want to catch any possible error, use IF when you specifically want to handle only the zero-division case and see other errors if they occur.

✓ Module 12 Complete — You Have Learned:

  • What a formula is — must begin with =; can contain values, cell references, operators, functions; cell displays result, Formula Bar shows the formula; auto-recalculates
  • Formula vs value vs text — identification by alignment and Formula Bar content
  • Arithmetic operators — + (add), − (subtract), * (multiply), / (divide), ^ (power), % (percentage), & (concatenate text); all 6 comparison operators (=, <>, >, <, >=, <=) and their use in logical tests
  • Operator precedence — 8-level order (parentheses first, then ^, negation, %, *, /, +, −, &, comparisons); 5 common precedence mistakes with explanations; golden rule: use parentheses when in doubt
  • Method 1: Manual entry — typing step-by-step; Point Mode (click cells instead of typing references); click-and-drag to enter ranges; IntelliSense function AutoComplete with Tab to accept; colour-coded cell references in Edit Mode; 11 practical formula examples (VAT, margins, concatenation, compound interest)
  • Method 2: AutoSum (Alt+= ★) — fastest method for totals; Excel auto-detects the range; multiple totals at once; AutoSum dropdown (Average, Count Numbers, Max, Min, More Functions)
  • Method 3: Insert Function wizard (fx, Shift+F3) — opening; searching by description; browsing by category; Function Arguments dialog (field descriptions, live formula result preview); when to use vs manual typing
  • Method 4: Formulas tab — 4 groups (Function Library with category buttons, Defined Names, Formula Auditing, Calculation); using Function Library to browse and insert by category; Trace Precedents/Dependents; Show Formulas mode (Ctrl+`); Evaluate Formula for debugging
  • Function syntax — structure diagram (=FUNCTION(arg1, arg2, [optional])); terms (function name, brackets, required vs optional arguments, comma separators, nested functions); 4 argument types (number, range, text in quotes, logical TRUE/FALSE)
  • 8 formula errors with meanings, causes, and fixes (#DIV/0!, #VALUE!, #REF!, #NAME?, #N/A, #NULL!, #NUM!, #######)

← Back to All Modules