Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 386
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,058
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 489
Default 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
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
Sumproduct copying blanks or how to insert zero into blanks asg2307 Excel Worksheet Functions 4 April 4th 07 07:26 PM
copy range of cells with blanks then paste without blanks justaguyfromky Excel Programming 5 September 3rd 06 11:23 PM
copy range of cells with blanks then paste without blanks justaguyfromky Excel Worksheet Functions 1 September 3rd 06 07:56 PM
code skips blanks in data Alan M Excel Programming 1 October 10th 05 12:20 PM
Paste Special Skip Blanks not skipping blanks, but overwriting... gsrosin Excel Discussion (Misc queries) 0 February 22nd 05 03:33 AM


All times are GMT +1. The time now is 09:07 AM.

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"