Replace blank cells with NONE

G

Guest

Does anyone know how to cycle through a column or range and replace empty
cells with a value like 0 or NONE? The last row can vary each time...

Here is the code I have so far:

Dim strLstRw As String
strLstRw = ActiveSheet.Range("A65536").End(xlUp).Row


'change empty cells to "NONE"

Range("e11").Select


Do

If IsEmpty(ActiveCell) = True Then

ActiveCell.Value = "NONE"
ActiveCell.Offset(1, 0).Select

End If

Loop Until ActiveCell = "e" & strLstRw
 
Z

Zone

I haven't tested this, but it looks like the last line show be
Loop Until ActiveCell.Address = "$E$" & strLstRw
 
D

Dana DeLouis

Maybe another idea:

On Error Resume Next 'In case there are no blanks.
Range("A1:A10").SpecialCells(xlCellTypeBlanks) = "None"
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top