0
0
Excelspreadsheet~10 mins

VBA editor basics in Excel - Cell-by-Cell Formula Trace

Choose your learning style9 modes available
Sample Data

Sample numbers in columns A and B to use with VBA macros.

CellValue
A110
A220
A330
B15
B215
B325
Formula Trace
Sub SumCells() Dim total As Integer total = Range("A1").Value + Range("B1").Value MsgBox "Sum is " & total End Sub
Step 1: Range("A1").Value
Step 2: Range("B1").Value
Step 3: total = 10 + 5
Step 4: MsgBox "Sum is " & total
Cell Reference Map
10
20
30
Cells A1 and B1 are referenced in the VBA macro to calculate the sum.
Result
10
20
30
The macro reads values from A1 and B1, sums them, and shows the result in a message box.
Sheet Trace Quiz - 3 Questions
Test your understanding
What does Range("A1").Value return in the macro?
AThe value 10 from cell A1
BThe address of cell A1
CThe sum of all cells in column A
DAn error because Range is not defined
Key Result
VBA macros read cell values using Range("CellAddress").Value and can display results with MsgBox.