A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Excel » New Users
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Zeros if cell is blank



 
 
Thread Tools Display Modes
  #1  
Old August 28th, 2009, 05:45 PM posted to microsoft.public.excel.newusers
pcor
external usenet poster
 
Posts: 171
Default Zeros if cell is blank

I would like to be able to select a portion of my spread sheet and then have
a macro that would search every cell in the selected area: if the cell is
blank I would want a ZERO to be placed in that cell but if the cell contains
a number/text that cell would be left as is.
Thanks

  #2  
Old August 28th, 2009, 05:53 PM posted to microsoft.public.excel.newusers
Dave Peterson
external usenet poster
 
Posts: 19,791
Default Zeros if cell is blank

You can record a macro when you do this:
Select the range
Edit|Goto (or hit F5 or ctrl-g)|Special|check blanks|ok
type 0
and ctrl-enter to fill all those empty (really empty) cells with 0's.

Or you could record a macro when you:
select the range
edit|replace
what: (leave blank)
with: 0
replace all

Either of these should be quicker than looking through each cell in the range.

pcor wrote:

I would like to be able to select a portion of my spread sheet and then have
a macro that would search every cell in the selected area: if the cell is
blank I would want a ZERO to be placed in that cell but if the cell contains
a number/text that cell would be left as is.
Thanks


--

Dave Peterson
  #3  
Old August 28th, 2009, 06:31 PM posted to microsoft.public.excel.newusers
pcor
external usenet poster
 
Posts: 171
Default Zeros if cell is blank

You are absolutely right sure beat a macro
THANKS

"Dave Peterson" wrote:

You can record a macro when you do this:
Select the range
Edit|Goto (or hit F5 or ctrl-g)|Special|check blanks|ok
type 0
and ctrl-enter to fill all those empty (really empty) cells with 0's.

Or you could record a macro when you:
select the range
edit|replace
what: (leave blank)
with: 0
replace all

Either of these should be quicker than looking through each cell in the range.

pcor wrote:

I would like to be able to select a portion of my spread sheet and then have
a macro that would search every cell in the selected area: if the cell is
blank I would want a ZERO to be placed in that cell but if the cell contains
a number/text that cell would be left as is.
Thanks


--

Dave Peterson

 




Thread Tools
Display Modes

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

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 10:21 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.