Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / General Excel Questions / August 2007

Tip: Looking for answers? Try searching our database.

replace null cells within a range to 0

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Abbey Normal - 28 Aug 2007 22:54 GMT
Hi. Is there a way to check a range of cells within a worksheet to see if
they are null, and if so to replace it with a zero? I tried reformatting the
column, but it doesnt do anything with the nulls. It needs to be a number
because I am importing it to a linked file.
Thanks,
rdwj - 28 Aug 2007 22:58 GMT
not sure if I understand what you mean with Null, but if you mean Null as in
Empty, you can write an easy macro
Sub Change_Empty_to_Zero
For every mycell in selection
   if mycell = "" then mycell = 0
next
exit sub

> Hi. Is there a way to check a range of cells within a worksheet to see if
> they are null, and if so to replace it with a zero? I tried reformatting the
> column, but it doesnt do anything with the nulls. It needs to be a number
> because I am importing it to a linked file.
> Thanks,
Jim Thomlinson - 28 Aug 2007 23:00 GMT
Place a Zero in any cell and copy it. Now highlight the area with the
potential null (blank) cells. Select F5 (or ctrl+G or Edit -> Goto) and press
Special... -> Blanks.
All of the blank cells should now be selected. Paste the 0 that you copied.
Signature

HTH...

Jim Thomlinson

> Hi. Is there a way to check a range of cells within a worksheet to see if
> they are null, and if so to replace it with a zero? I tried reformatting the
> column, but it doesnt do anything with the nulls. It needs to be a number
> because I am importing it to a linked file.
> Thanks,
Dave Peterson - 28 Aug 2007 23:13 GMT
Or just
Select the range
edit|goto|special|blanks
type 0
and hit ctrl-enter to fill all those empty cells in the original selection.

> Place a Zero in any cell and copy it. Now highlight the area with the
> potential null (blank) cells. Select F5 (or ctrl+G or Edit -> Goto) and press
[quoted text clipped - 10 lines]
> > because I am importing it to a linked file.
> > Thanks,

Signature

Dave Peterson

Jim Thomlinson - 28 Aug 2007 23:26 GMT
Thanks Dave... I know that I can do that but somehow I just always do the
copy and paste thing. I'm a creature of habit I guess... and somehow I assume
everyone should join me in my habits...  :-)
Signature

HTH...

Jim Thomlinson

> Or just
> Select the range
[quoted text clipped - 16 lines]
> > > because I am importing it to a linked file.
> > > Thanks,
Abbey Normal - 29 Aug 2007 01:54 GMT
Wow. that worked like a charm! Thank you.

> Thanks Dave... I know that I can do that but somehow I just always do the
> copy and paste thing. I'm a creature of habit I guess... and somehow I assume
[quoted text clipped - 20 lines]
> > > > because I am importing it to a linked file.
> > > > Thanks,
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.