![]() |
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 |
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 |
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 |
All times are GMT +1. The time now is 12:42 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com