Autofill empty cells with content from the first cell above the empty cells in Microsoft Excel


Non Macro Solution
  1. Select the first cell that have the content that need to be paste to the empty cells.
  2. Scroll down to the last empty cells below the first cell that needed to be fill.
  3. Hold shift and select the last cell.
  4. Ctrl + D
Macro Solution
Sub fill_cells()
    Selection.SpecialCells(xlCellTypeBlanks).Select
    Selection.FormulaR1C1 = "=R[-1]C"
    Range(Cells(1, 1), Selection.SpecialCells(xlCellTypeLastCell)).Select
    Selection.Copy
    Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:=False, Transpose:=False
End Sub
References:

Comments

Popular posts from this blog

City Code Table for Casio SGW300HD-1AV Watch

How to force only 4G or LTE network connection for Samsung Galaxy Note 4

Mounting NFS share directory from D-link DNS 320L on Ubuntu 12.04 LTS