Select column
A
click “Special…”
tick “Blanks” and hitclick “OK”
enter an equals sign, =
hit the up arrow key, ↑
hold down Ctrl and hit Enter
Now all the previously empty cells have a formula that references the cell above.
To replace the formulas with the values, copy column A
and paste over itself with “Paste Special” → “Values”.
Note: If the F5 key does not open the "Go To" dialogue, the function keys on a laptop may use the laptop controls as a default. In that case, hold the Fn key while pressing F5.
The "Go To" dialog can also be accessed with Ctrl-G in Excel for Windows.
The ribbon has the "Go To" command in the "Find and Select" dropdown at the very right of the Home ribbon, where you can save a click if you hit "Go To Special".