Do you really need code?
  1. Select the column with the blanks.
  2. Goto Edit>Goto...Special and select blanks.
  3. Goto the formula bar, enter =A1 (or whatever the first cell with data is) and then press CTRL+ENTER.
  4. Select the column, copy and paste special values.