Challenge 1: FillSquares — Solution Walkthrough Option Explicit Sub FillSquares() Dim i As Integer For i = 1 To 10 Cells(i, 1).Value = i ^ 2 Next i End Sub Expected result: A1 = 1 A2 = 4 A3 = 9 A4 = 16 A5 = 25 A6 = 36 A7 = 49 A8 = 64 A9 = 81 A10 = 100 WHY THIS WORKS AS AN ANSWER ------------------------------ Option Explicit sits as the very first line of the MODULE itself, above the Sub statement — not inside the Sub — which is what forces every variable in every procedure in that module to be declared before use. The single Dim i As Integer declares the loop counter, satisfying that requirement. The For i = 1 To 10 loop runs its body exactly 10 times, with i taking the values 1 through 10 in order, one per iteration. Cells(i, 1) addresses row i, column 1 (column A) — so as i counts up from 1 to 10, the code writes into A1 through A10 in turn. i ^ 2 is VBA's exponentiation operator, squaring the current counter value before it's stored. Notes: - Cells(i, 1) was deliberately used instead of Range("A" & i) (string- concatenating a cell address by hand) specifically because a numeric row/column pair is easier to work with inside a loop where the row itself is a variable, not fixed text — exactly the reason this chapter introduced Cells alongside Range in the first place.