Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 69
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 269
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 69
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 947
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Excel - Replace blank cells Newsgal Excel Discussion (Misc queries) 1 August 31st 06 07:13 PM
Replace cells with blank diggers Excel Worksheet Functions 1 November 17th 05 12:23 AM
Replace cells with blank Elkar Excel Worksheet Functions 0 November 16th 05 10:21 PM
Search and Replace Blank Cells wpw3 Excel Programming 2 October 21st 05 12:42 AM
How can I replace a range of blank cells with a 0 Replacing blank cells Excel Discussion (Misc queries) 1 August 19th 05 12:01 AM


All times are GMT +1. The time now is 08:45 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"