Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Rum Rum is offline
external usenet poster
 
Posts: 16
Default (B2-A2)=0; How to get a blank and NOT '0'

Hi,

When I do (B2-A2) I get a '0'.

How can I have a blank cell as a result even if the answer is '0'?

Thanks
Regards
Rum
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,670
Default (B2-A2)=0; How to get a blank and NOT '0'

=if((B2-A2)=0,"",B2-A2)



"Rum" wrote:

Hi,

When I do (B2-A2) I get a '0'.

How can I have a blank cell as a result even if the answer is '0'?

Thanks
Regards
Rum

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,276
Default (B2-A2)=0; How to get a blank and NOT '0'

Hi,
if(B2-A2=0,"",B2-A2)




"Rum" wrote:

Hi,

When I do (B2-A2) I get a '0'.

How can I have a blank cell as a result even if the answer is '0'?

Thanks
Regards
Rum

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,059
Default (B2-A2)=0; How to get a blank and NOT '0'

"Rum" wrote:
When I do (B2-A2) I get a '0'.
How can I have a blank cell as a result even if the answer is '0'?


If you want the value of the cell to be "blank" (actually the null string)
instead of zero, then:

=if(B2-A2 = 0, "", B2-A2)

Alternatively, simply use =B2-A2 and create the custom format
"General;-General;" without quotes. You can replace "General" with whatever
numeric format you wish, e.g. "0.00;-0.00;" for the equivalient of Number
with 2 decimal places, but blank for zero.

Using a custom format, the value in the cell is still zero; it just appears
blank. Using the IF() expression, the value in the cell is the string ""
instead of zero. That can cause complications in formulas that reference
the cell value.

PS: Beware that sometimes B2-A2 __appears__ zero, but it actually is not.
Neither approach avoids displaying 0 in that case. Are you worried about
that?

  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 38
Default (B2-A2)=0; How to get a blank and NOT '0'

On Jul 29, 7:08�pm, "JoeU2004" wrote:
<snip
Alternatively, simply use =B2-A2 and create the custom format
"General;-General;" without quotes. �You can replace "General" with whatever
numeric format you wish, e.g. "0.00;-0.00;" for the equivalient of Number
with 2 decimal places, but blank for zero.

<snip

Is that so ? Maybe in later versions of Excel but my Excel 97 needs
the third specification to show zero. ie . . .

0.00;-0.00;""

The first element is the format for positive values, the second is for
negative values and the third is for zero values.

Strings in the format specifier are useful for special displays.
eg . . .

"Pay �"0.00;"Refund �"0.00;"Nothing to pay"

.. . . instead of using a function formula to generate alternative cell
display strings.

Alan Lloyd
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
Index/match - make blank cells return a blank value. diaare Excel Worksheet Functions 3 May 3rd 23 03:44 AM
Excel 2002: Return blank when VLOOKUP on blank cells Mr. Low Excel Discussion (Misc queries) 2 June 4th 09 05:12 PM
Average Formula to display blank cell if named range is blank Rachael F Excel Worksheet Functions 3 February 22nd 08 05:05 PM
Not showing blank and non blank items in filter mode for values Bhaskar Polisetty Excel Worksheet Functions 0 June 20th 06 02:04 PM
How do I make a blank cell with a date format blank? Pivot Table/Query Excel Worksheet Functions 6 June 14th 05 11:19 PM


All times are GMT +1. The time now is 10:03 AM.

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"