Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 4
Default reading a blank cell as zero

I'm a first time poster so please be patient if I don't give enough detail.
I'm trying to put an if stmt in one cell and conditionally format that cell.
My current formula is =IF(D10=0,D10,NA()). But when D10 is blank it puts a
zero in E10 and thus my conditional format colors the cell. What I want is
#NA to appear in E10 which blocks the conditional formatting. This seems easy
enough but wont work. I've tried different formulas with no luck.
Thanks for any help.
Dana

  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 170
Default reading a blank cell as zero

If you want the text "#NA" to appear in cell E10, try this modification to
your formula =IF(D10=0,D10,"#NA").

hth

"Dana Stricker" wrote:

I'm a first time poster so please be patient if I don't give enough detail.
I'm trying to put an if stmt in one cell and conditionally format that cell.
My current formula is =IF(D10=0,D10,NA()). But when D10 is blank it puts a
zero in E10 and thus my conditional format colors the cell. What I want is
#NA to appear in E10 which blocks the conditional formatting. This seems easy
enough but wont work. I've tried different formulas with no luck.
Thanks for any help.
Dana

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1,069
Default reading a blank cell as zero

Try

=IF(AND(LEN(D10)0,D10=0),D10,NA())

Hope this helps,

Hutch

"Dana Stricker" wrote:

I'm a first time poster so please be patient if I don't give enough detail.
I'm trying to put an if stmt in one cell and conditionally format that cell.
My current formula is =IF(D10=0,D10,NA()). But when D10 is blank it puts a
zero in E10 and thus my conditional format colors the cell. What I want is
#NA to appear in E10 which blocks the conditional formatting. This seems easy
enough but wont work. I've tried different formulas with no luck.
Thanks for any help.
Dana

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 4
Default reading a blank cell as zero

Hutch - you're my new hero. Works perfect. However, new problem. I have an
autosum of column E which is now giving me #NA unless all cells are filled.
Do you know of another formula that reads only cells with a value of zero or
greater?
I'm trying =IF(E6:E220,SUM(E6:E22)) but getting #VALUE!

"Tom Hutchins" wrote:

Try

=IF(AND(LEN(D10)0,D10=0),D10,NA())

Hope this helps,

Hutch

"Dana Stricker" wrote:

I'm a first time poster so please be patient if I don't give enough detail.
I'm trying to put an if stmt in one cell and conditionally format that cell.
My current formula is =IF(D10=0,D10,NA()). But when D10 is blank it puts a
zero in E10 and thus my conditional format colors the cell. What I want is
#NA to appear in E10 which blocks the conditional formatting. This seems easy
enough but wont work. I've tried different formulas with no luck.
Thanks for any help.
Dana

  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1,069
Default reading a blank cell as zero

Your other formula may cause some cells in column E to contain #N/A. That
will interfere with any SUM function unless we work around it. The other
thing is, to test a range of cells with an IF function you have to enter it
as an array formula. I think the following array formula will work:

=SUM(IF(ISERROR(E6:E22),0,E6:E22))

This is an array formula. Hit Ctrl-Shift-Enter instead of Enter. If you do
it
correctly, Excel will wrap curly brackets { } around your formula (don't add
them yourself.) You can copy/move/paste array formulas like regular
formulas, but if you edit it, you always have to press Ctrl-Shift-Enter
instead of Enter.

Hutch

"Dana Stricker" wrote:

Hutch - you're my new hero. Works perfect. However, new problem. I have an
autosum of column E which is now giving me #NA unless all cells are filled.
Do you know of another formula that reads only cells with a value of zero or
greater?
I'm trying =IF(E6:E220,SUM(E6:E22)) but getting #VALUE!

"Tom Hutchins" wrote:

Try

=IF(AND(LEN(D10)0,D10=0),D10,NA())

Hope this helps,

Hutch

"Dana Stricker" wrote:

I'm a first time poster so please be patient if I don't give enough detail.
I'm trying to put an if stmt in one cell and conditionally format that cell.
My current formula is =IF(D10=0,D10,NA()). But when D10 is blank it puts a
zero in E10 and thus my conditional format colors the cell. What I want is
#NA to appear in E10 which blocks the conditional formatting. This seems easy
enough but wont work. I've tried different formulas with no luck.
Thanks for any help.
Dana



  #6   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 4
Default reading a blank cell as zero

Hutch - once again it works perfectly!
thank you so much for your time and help.
Dana

"Dana Stricker" wrote:

I'm a first time poster so please be patient if I don't give enough detail.
I'm trying to put an if stmt in one cell and conditionally format that cell.
My current formula is =IF(D10=0,D10,NA()). But when D10 is blank it puts a
zero in E10 and thus my conditional format colors the cell. What I want is
#NA to appear in E10 which blocks the conditional formatting. This seems easy
enough but wont work. I've tried different formulas with no luck.
Thanks for any help.
Dana

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
Reading a cell in VBA Ruatha New Users to Excel 3 June 11th 06 04:01 PM
Reading last cell jackh7777777 Excel Discussion (Misc queries) 2 May 26th 06 01:28 AM
Reading formulae in a different cell Albert Excel Discussion (Misc queries) 3 May 5th 06 10:42 AM
Reading Cell Function??? roy.okinawa Excel Worksheet Functions 2 December 1st 05 11:29 PM
reading blank cell as active - how can I stop it ? Nu-bEE Excel Discussion (Misc queries) 1 March 20th 05 10:45 PM


All times are GMT +1. The time now is 01:17 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"