SkywardPalm
New Member
- Joined
- Oct 23, 2021
- Messages
- 48
- Office Version
-
- 365
- Platform
-
- Windows
I'm trying to figure out how to populate blank cells in a range with the text "blank" along with an incremental number next to it to distinguish each blank value. I'm getting an error during the debug with the cell.Value... line. Any suggestions for how to go about this?
VBA Code:
Dim CurrentRange, BlankCount
With ActiveWorkbook.Worksheets("Current")
LastRowCurrent = .Cells(.Rows.Count, "A").End(xlUp).Row
CurrentRange = Range("C1:C" & LastRowCurrent)
BlankCount = 1
End With
For Each cell In CurrentRange
If IsEmpty(cell) Then
cell.Value = "blank(" & BlankCount & ")"
BlankCount = BlankCount + 1
End If
Next cell