PC Review


Reply
Thread Tools Rate Thread

Blanks -> 0 code

 
 
LiAD
Guest
Posts: n/a
 
      15th Dec 2009
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 With Quote
 
 
 
 
Gary''s Student
Guest
Posts: n/a
 
      15th Dec 2009
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

 
Reply With Quote
 
Ryan H
Guest
Posts: n/a
 
      15th Dec 2009
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 With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
copy range of cells with blanks then paste without blanks =?Utf-8?B?anVzdGFndXlmcm9ta3k=?= Microsoft Excel Programming 5 3rd Sep 2006 11:23 PM
copy range of cells with blanks then paste without blanks =?Utf-8?B?anVzdGFndXlmcm9ta3k=?= Microsoft Excel Worksheet Functions 1 3rd Sep 2006 07:56 PM
Adding 'Blanks' & 'Non-blanks' to a filter combo box Robin Microsoft Access VBA Modules 2 2nd Aug 2006 05:48 PM
code skips blanks in data =?Utf-8?B?QWxhbiBN?= Microsoft Excel Programming 1 10th Oct 2005 12:20 PM
Paste Special Skip Blanks not skipping blanks, but overwriting... =?Utf-8?B?Z3Nyb3Npbg==?= Microsoft Excel Misc 0 22nd Feb 2005 03:33 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 11:54 AM.