Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 16
Default replace null cells within a range to 0

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,
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 95
Default replace null cells within a range to 0

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

"Abbey Normal" wrote:

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,

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 5,939
Default replace null cells within a range to 0

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.
--
HTH...

Jim Thomlinson


"Abbey Normal" wrote:

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,

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 35,218
Default replace null cells within a range to 0

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.

Jim Thomlinson wrote:

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.
--
HTH...

Jim Thomlinson

"Abbey Normal" wrote:

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
  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 5,939
Default replace null cells within a range to 0

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... :-)
--
HTH...

Jim Thomlinson


"Dave Peterson" wrote:

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.

Jim Thomlinson wrote:

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.
--
HTH...

Jim Thomlinson

"Abbey Normal" wrote:

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



  #6   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 16
Default replace null cells within a range to 0

Wow. that worked like a charm! Thank you.

"Jim Thomlinson" wrote:

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... :-)
--
HTH...

Jim Thomlinson


"Dave Peterson" wrote:

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.

Jim Thomlinson wrote:

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.
--
HTH...

Jim Thomlinson

"Abbey Normal" wrote:

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

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
How to replace null values with zero? Eric Setting up and Configuration of Excel 2 April 28th 23 03:43 AM
How do I find and replace null values in Excel 2002 worksheets? Peter Excel Worksheet Functions 5 October 27th 06 04:53 AM
Replace Null value in Coloumn Plumdodge Excel Discussion (Misc queries) 2 November 8th 05 11:00 PM
How can I replace a range of blank cells with a 0 Replacing blank cells Excel Discussion (Misc queries) 1 August 19th 05 12:01 AM
Replace null string with blank cell gjcase Excel Discussion (Misc queries) 2 August 9th 05 02:13 PM


All times are GMT +1. The time now is 08:32 PM.

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"