Hoping someone can help with this one.
I need a VBA that can locate every blank cell in columns A-F and fill in each blank cell with the cell value or any other unique number so that every cell shows a different value rather than the blank cells all showing the same value.
I have currently been using the following but it doesn't always work:
Sub FillBlanksWithCellAddress()
Dim LastRow As Variant, Cell As Range
LastRow = Application.InputBox("What is the last row number?", Type:=1)
If LastRow = "False" Then Exit Sub
For Each Cell In Range("A1:F" & LastRow).SpecialCells(xlBlanks)
Cell.Value = Cell.Address(0, 0)
Next
End Sub
I need a VBA that can locate every blank cell in columns A-F and fill in each blank cell with the cell value or any other unique number so that every cell shows a different value rather than the blank cells all showing the same value.
I have currently been using the following but it doesn't always work:
Sub FillBlanksWithCellAddress()
Dim LastRow As Variant, Cell As Range
LastRow = Application.InputBox("What is the last row number?", Type:=1)
If LastRow = "False" Then Exit Sub
For Each Cell In Range("A1:F" & LastRow).SpecialCells(xlBlanks)
Cell.Value = Cell.Address(0, 0)
Next
End Sub