Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Replace blank cells with NONE
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 |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Replace blank cells with NONE
I haven't tested this, but it looks like the last line show be
Loop Until ActiveCell.Address = "$E$" & strLstRw TimT wrote: 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 |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Replace blank cells with NONE
Zone,
I got it... I used Activecell.row= strLstRw Thanks brah! "Zone" wrote: I haven't tested this, but it looks like the last line show be Loop Until ActiveCell.Address = "$E$" & strLstRw TimT wrote: 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 |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Replace blank cells with NONE
Maybe another idea:
On Error Resume Next 'In case there are no blanks. Range("A1:A10").SpecialCells(xlCellTypeBlanks) = "None" -- HTH. :) Dana DeLouis Windows XP, Office 2003 "TimT" wrote in message ... 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 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Excel - Replace blank cells | Excel Discussion (Misc queries) | |||
Replace cells with blank | Excel Worksheet Functions | |||
Replace cells with blank | Excel Worksheet Functions | |||
Search and Replace Blank Cells | Excel Programming | |||
How can I replace a range of blank cells with a 0 | Excel Discussion (Misc queries) |