Thanks Leith,
I gave that code a try, however that seemed to copy the value in the first row down to the last in the selection overwriting any values in the middle. It should be copying down to the next non-blank cell, and then starting over with the new value it finds filling the blanks to the the next non blank.
I know these 2 samples I found partially work. but if the cell is formatted as text, it returns the "=R[-1]C" when it should be returning the cell value of that first non blank above it.
Both of these work if the cell if formatted as General. But if the formatting is Text it fails.
Sub XFillInBlanks()
Dim Rng1 As Range, Rng2 As Range
Set Rng1 = Selection
On Error Resume Next
Set Rng2 = Rng1.SpecialCells(xlCellTypeBlanks)
On Error GoTo 0
If Not Rng2 Is Nothing Then
Rng2.FormulaR1C1 = "=R[-1]C"
With Rng1
.Value = .Value
End With
End If
End Sub
Sub Fill_Blank_Cells()
Selection.SpecialCells(xlCellTypeBlanks).Select
Selection.FormulaR1C1 = "=R[-1]C"
End Sub
Bookmarks