Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 14
Default Formatting Cell that Contains If/Then Formula

I have a cell with the following formula:

=IF(A1=0," ",IF(E170,+E17,"0"))

I'd like to format the cell with a Currency symbol, but can't seem to figure
out how to do so. As long as the above formula is in the cell, the number
displays without the currency symbol, even though I've formatted it as
currency by going to format cells, number, currency.

If I remove the above formula and just type a simple formula like =A1*A2
the number is formatted correctly with the currency symbol.

What am I doing wrong? Thanks
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 136
Default Formatting Cell that Contains If/Then Formula

Does this work for you?

=IF(A1=0," ",IF(E170,TEXT(E17,"$#,##0.00"),"0"))

"Janna" wrote:

I have a cell with the following formula:

=IF(A1=0," ",IF(E170,+E17,"0"))

I'd like to format the cell with a Currency symbol, but can't seem to figure
out how to do so. As long as the above formula is in the cell, the number
displays without the currency symbol, even though I've formatted it as
currency by going to format cells, number, currency.

If I remove the above formula and just type a simple formula like =A1*A2
the number is formatted correctly with the currency symbol.

What am I doing wrong? Thanks

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 35,218
Default Formatting Cell that Contains If/Then Formula

What's in E17? Are you sure it's numeric?

If you put this formula in an empty cell:
=isnumber(e17)
what is returned?

If that formula returns False, then E17 is not a number. That means that the
number formatting won't do anything. I'd change the value in E17 to a real
number (format E17 as general and retype the entry).

I'd also use this formula:
=IF(A1=0,"",IF(E170,+E17,0))

I don't like cells with " " (a space character) or a text 0 ("0") in them.

Janna wrote:

I have a cell with the following formula:

=IF(A1=0," ",IF(E170,+E17,"0"))

I'd like to format the cell with a Currency symbol, but can't seem to figure
out how to do so. As long as the above formula is in the cell, the number
displays without the currency symbol, even though I've formatted it as
currency by going to format cells, number, currency.

If I remove the above formula and just type a simple formula like =A1*A2
the number is formatted correctly with the currency symbol.

What am I doing wrong? Thanks


--

Dave Peterson
  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 623
Default Formatting Cell that Contains If/Then Formula

If E17 is greater than 0, you should get e17 formatted as currency.

However, if e17 is not greater than zero, you get zero displayed as text,
because you put it in quotes. Is this the problem you see? You get 0, rather
than $0.00?

If so, remove the quotes from the last zero. In addition, the plus sign before
e17 is superfluous. Your formula can be simplified as:

=IF(A1=0," ",IF(E170,E17,0))

which can be further simplified to:

=if(a1=0," ",max(e17,0))


--
Regards,
Fred


"Janna" wrote in message
...
I have a cell with the following formula:

=IF(A1=0," ",IF(E170,+E17,"0"))

I'd like to format the cell with a Currency symbol, but can't seem to figure
out how to do so. As long as the above formula is in the cell, the number
displays without the currency symbol, even though I've formatted it as
currency by going to format cells, number, currency.

If I remove the above formula and just type a simple formula like =A1*A2
the number is formatted correctly with the currency symbol.

What am I doing wrong? Thanks



  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 136
Default Formatting Cell that Contains If/Then Formula

BTW what good does the plus sign before the E17 Reference do? If the number
is negative it's by definition less than zero?

"Dave Peterson" wrote:

What's in E17? Are you sure it's numeric?

If you put this formula in an empty cell:
=isnumber(e17)
what is returned?

If that formula returns False, then E17 is not a number. That means that the
number formatting won't do anything. I'd change the value in E17 to a real
number (format E17 as general and retype the entry).

I'd also use this formula:
=IF(A1=0,"",IF(E170,+E17,0))

I don't like cells with " " (a space character) or a text 0 ("0") in them.

Janna wrote:

I have a cell with the following formula:

=IF(A1=0," ",IF(E170,+E17,"0"))

I'd like to format the cell with a Currency symbol, but can't seem to figure
out how to do so. As long as the above formula is in the cell, the number
displays without the currency symbol, even though I've formatted it as
currency by going to format cells, number, currency.

If I remove the above formula and just type a simple formula like =A1*A2
the number is formatted correctly with the currency symbol.

What am I doing wrong? Thanks


--

Dave Peterson



  #6   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 35,218
Default Formatting Cell that Contains If/Then Formula

It doesn't do anything. I'd remove that, too.

Tevuna wrote:

BTW what good does the plus sign before the E17 Reference do? If the number
is negative it's by definition less than zero?

"Dave Peterson" wrote:

What's in E17? Are you sure it's numeric?

If you put this formula in an empty cell:
=isnumber(e17)
what is returned?

If that formula returns False, then E17 is not a number. That means that the
number formatting won't do anything. I'd change the value in E17 to a real
number (format E17 as general and retype the entry).

I'd also use this formula:
=IF(A1=0,"",IF(E170,+E17,0))

I don't like cells with " " (a space character) or a text 0 ("0") in them.

Janna wrote:

I have a cell with the following formula:

=IF(A1=0," ",IF(E170,+E17,"0"))

I'd like to format the cell with a Currency symbol, but can't seem to figure
out how to do so. As long as the above formula is in the cell, the number
displays without the currency symbol, even though I've formatted it as
currency by going to format cells, number, currency.

If I remove the above formula and just type a simple formula like =A1*A2
the number is formatted correctly with the currency symbol.

What am I doing wrong? Thanks


--

Dave Peterson


--

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
In a formula, copy the value and formatting of another cell papakfl Excel Worksheet Functions 4 April 29th 07 02:22 PM
cell formula or formatting jnu Excel Worksheet Functions 5 December 11th 06 08:23 PM
Formatting a formula within a cell Nancee Vee Excel Discussion (Misc queries) 4 September 28th 06 03:49 PM
formatting won't apply to my cell with a formula Adrienne Excel Worksheet Functions 9 November 27th 05 05:44 PM
Formatting a cell for color that has a formula also Karl Excel Discussion (Misc queries) 2 July 17th 05 12:03 AM


All times are GMT +1. The time now is 07:43 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"