Good afternoon, I have a spreadsheet with about 10 years of data. The data dates are in column A, but are not filled in all the way - if 3 samples were collected on 1/2/06, only the first sample has a date. I would like to autofill the blanks with the previous number. I have a macro that I am trying to put together, but seem to have something wrong, could anyone please correct it for me? I don't mind using one for each sheet, I can run it for each sheet individually.
Sub Fill_Blank_Cells()
Dim LR As Long
LR = Range("A" & Rows.Count).End(xlUp).Row
With Range("A2:A" & LR)
.SpecialCells(xlCellTypeBlanks).FormulaR1C1 = "=R[-1]C"
.Value = .Value
End With
Call SortData
End Sub
Thanks!
Bookmarks