PC Review


Reply
Thread Tools Rate Thread

Distinguishing 0 formatted as "na" and as 0

 
 
jayray
Guest
Posts: n/a
 
      23rd Jul 2008
With this standard format, a zero will appear as as 0:

#,##0;-#,##0

However, you can set zero to appear as "na" using the following
format:

#,##0;-#,##0;"na"

My question is whether it is possible to test whether the cell is
showing a 0 as "na", even though the underlying value is still a 0.
For example, I cannot use IF(A10="na",... because the cell A10
actually still contains a 0; it just looks like "na" because of the
formatting.



 
Reply With Quote
 
 
 
 
Wigi
Guest
Posts: n/a
 
      23rd Jul 2008
You'll need VBA to make the distinction.



--
Wigi
http://www.wimgielis.be = Excel/VBA, soccer and music


"jayray" wrote:

> With this standard format, a zero will appear as as 0:
>
> #,##0;-#,##0
>
> However, you can set zero to appear as "na" using the following
> format:
>
> #,##0;-#,##0;"na"
>
> My question is whether it is possible to test whether the cell is
> showing a 0 as "na", even though the underlying value is still a 0.
> For example, I cannot use IF(A10="na",... because the cell A10
> actually still contains a 0; it just looks like "na" because of the
> formatting.
>
>
>
>

 
Reply With Quote
 
Mike H
Guest
Posts: n/a
 
      23rd Jul 2008
Why can't you use if(a1=0 because as you correctly save that value displays
as 'na' so if a1=0 evatuates as TRUE then the cell is displaying na

Mike

"jayray" wrote:

> With this standard format, a zero will appear as as 0:
>
> #,##0;-#,##0
>
> However, you can set zero to appear as "na" using the following
> format:
>
> #,##0;-#,##0;"na"
>
> My question is whether it is possible to test whether the cell is
> showing a 0 as "na", even though the underlying value is still a 0.
> For example, I cannot use IF(A10="na",... because the cell A10
> actually still contains a 0; it just looks like "na" because of the
> formatting.
>
>
>
>

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Conditional formatting: How to set condition "formula" with is "date"formatted AA Arens Microsoft Excel Discussion 10 31st Jan 2008 01:57 AM
"The disk in drive G cannot be formatted" "Windows was unable to complete the format" Windows XP Performance 3 26th Nov 2007 06:21 PM
Cells formatted with "("@")" don't change when text pasted in (?). StargateFan Microsoft Excel Discussion 2 7th Apr 2007 11:15 PM
In Excel a cell formatted "currency" shows "######" help! =?Utf-8?B?bGx2ZWRh?= Microsoft Excel Worksheet Functions 2 7th Apr 2006 09:39 PM
cells formatted to tick when text value "Y" if or null if "N" =?Utf-8?B?SmF5?= Microsoft Excel Misc 7 13th Jan 2006 09:16 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 02:29 AM.