Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi Susan,
Thank you! It has helped a lot. I can see other places where I can run this code. You made it much simpler. I sure appreciate it. Regards, -- Thank you, Electricbluelady "Susan" wrote: try this: (untested) Sub electricbluelady() dim myRange as range dim r as range set myRange = activesheet.range("a1:d50") '<=== change to suit range for each r in myRange if r.value = "" then r.value = 0 end if next r End Sub this will loop through each cell in the range, and if the range is blank, it will insert a zero. hope it helps! :) susan On Jun 20, 3:23 pm, electricbluelady wrote: Hi everyone, I have a range of 30 cells in a column, but most have numbers, and some are blank. I need to write a procedure to replace blank cells with zeros, and to skip over existing numbers. I need to keep this within the 30 cells in my range. Any help would be greatly appreciated! Thank you, Electricbluelady |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Fill a 15 Characters Data with Zeros | Excel Discussion (Misc queries) | |||
add zeros to fill in and | Excel Worksheet Functions | |||
add zeros to fill in and | Excel Worksheet Functions | |||
add zeros to fill in and | Excel Worksheet Functions | |||
Add leading zeros fill space | Excel Programming |