![]() |
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, |
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, |
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, |
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 |
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 |
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 |
All times are GMT +1. The time now is 01:33 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com