Hello,
Please provide me a macro that would fill the blank cells in column A till row 13 (number of cells filled in column B).
I have a code if anyone can modify it or can provide me a new code anything can work for me.
Sandeep
Sub FillBlanks()
Dim rRange1 As Range, rRange2 As Range
Dim iReply As Integer
If Selection.Cells.Count = 1 Then
MsgBox "You must select your list and include the blank cells", vbInformation, "OzGrid.com"
Exit Sub
ElseIf Selection.Columns.Count > 1 Then
MsgBox "You must select only one column", vbInformation, "OzGrid.com"
Exit Sub
End If
Set rRange1 = Range(Selection.Cells(1, 1), Cells(65536, Selection.Column).End(xlUp))
On Error Resume Next
Set rRange2 = rRange1.SpecialCells(xlCellTypeBlanks)
On Error GoTo 0
If rRange2 Is Nothing Then
MsgBox "No blank cells Found", vbInformation, "OzGrid.com"
Exit Sub
End If
rRange2.FormulaR1C1 = "=R[-1]C"
iReply = MsgBox("Convert to Values", vbYesNo + vbQuestion, "OzGrid.com")
If iReply = vbYes Then rRange1 = rRange1.Value
End Sub
Bookmarks