Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Blanks - 0 code
Hi
Could someone give me a code please to replace a blank cell with a zero (0) please? inisde the cell there is a formula which returns the blank Thanks LiAD |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Blanks - 0 code
Sub zeroo()
For Each cel In Selection If cel.Value = "" Then cel.Value = 0 End If Next End Sub -- Gary''s Student - gsnu200909 "LiAD" wrote: Hi Could someone give me a code please to replace a blank cell with a zero (0) please? inisde the cell there is a formula which returns the blank Thanks LiAD |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Blanks - 0 code
If you use Gary's method you will delete the function that is in the cell.
If you want that then his method will work fine. There is another option you could use. I'm not sure which version you are using, but in Excel 2007 click the Windows icon in the upper left hand corner and select Excel Options. Click Advanced, and scroll down to Display Options for this Worksheet: then make sure the checkbox that reads "Show a zero in cells that have a zero value" is set to True. This will show a "0" in all your functions that calculate to "". You can do it in Excel 2003 also. I'm just not sure which menu tab its under. Try Tools or View, Maybe Edit. Hope this helps! If so, click "YES" below. -- Cheers, Ryan "LiAD" wrote: Hi Could someone give me a code please to replace a blank cell with a zero (0) please? inisde the cell there is a formula which returns the blank Thanks LiAD |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Sumproduct copying blanks or how to insert zero into blanks | Excel Worksheet Functions | |||
copy range of cells with blanks then paste without blanks | Excel Programming | |||
copy range of cells with blanks then paste without blanks | Excel Worksheet Functions | |||
code skips blanks in data | Excel Programming | |||
Paste Special Skip Blanks not skipping blanks, but overwriting... | Excel Discussion (Misc queries) |