Sample Data
Sample numbers in columns A and B to use with VBA macros.
| Cell | Value |
|---|---|
| A1 | 10 |
| A2 | 20 |
| A3 | 30 |
| B1 | 5 |
| B2 | 15 |
| B3 | 25 |
Sample numbers in columns A and B to use with VBA macros.
| Cell | Value |
|---|---|
| A1 | 10 |
| A2 | 20 |
| A3 | 30 |
| B1 | 5 |
| B2 | 15 |
| B3 | 25 |
Sub SumCells()
Dim total As Integer
total = Range("A1").Value + Range("B1").Value
MsgBox "Sum is " & total
End Sub