Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 33
Default conditionally format anumber format

I need a cell to read 69¢ if the amount is below a dollar, but $1.69 if the
amount exceeds a dollar. I know how to do either in FORMAT CELLS, but how do
I get Excel to see and format the cell based on this criteria?

Thank you in advance.
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 10,593
Default conditionally format anumber format

Not quite, but as close as I can get

[<1].00c;$#,##0.00

--
---
HTH

Bob


(there's no email, no snail mail, but somewhere should be gmail in my addy)



"Montana" wrote in message
...
I need a cell to read 69¢ if the amount is below a dollar, but $1.69 if the
amount exceeds a dollar. I know how to do either in FORMAT CELLS, but how
do
I get Excel to see and format the cell based on this criteria?

Thank you in advance.



  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
CLR CLR is offline
external usenet poster
 
Posts: 1,998
Default conditionally format anumber format

Are you talking about the SAME cell as the original value is entered in, or
another one to return the preset results? Also, what result do you expect to
see when the value is EXACTLY one dollar?

Vaya con Dios,
Chuck, CABGx3


"Montana" wrote:

I need a cell to read 69¢ if the amount is below a dollar, but $1.69 if the
amount exceeds a dollar. I know how to do either in FORMAT CELLS, but how do
I get Excel to see and format the cell based on this criteria?

Thank you in advance.

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,202
Default conditionally format anumber format

Not quite, but as close as I can get

[<1].00c;$#,##0.00


It looks like you can get the cent (¢) sign by typing Alt+0162 from the
number pad in place of typing the letter c; however, it looks like we are
stuck with that decimal point.

Rick

  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 33
Default conditionally format anumber format

Yes, in the same cell. If the value is 99, I want it to show 99¢. If it is a
dollar, it should read $1.00, not 100¢


  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 38
Default conditionally format anumber format

On Jan 15, 11:32 am, Montana
wrote:
Yes, in the same cell. If the value is 99, I want it to show 99¢. If it is a
dollar, it should read $1.00, not 100¢


It's not as elegant as building a custom format, but you could hide
the data and use a formula to display the data in the way you want it.
Here's an ugly IF function nest that would do it assuming your number
is in D10 and the cent symbol is in G5:

=IF(D10<1,(D10*100)&$G$5,IF(MOD(D10*100,100)=0,"$" &D10&".
00",IF(MOD(D10*100,10)=0,"$"&D10&"0","$"&D10)))

The two mod bits are to deal with even dollar amounts (the first one)
and even tens where Excel likes to trunc the zeros off (note that
formatting the original numbers with 2 decimals of display wouldn't
solve this particular issue).
You could also use CHAR(162) for the cent sign instead.
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
Conditionally format on result ranges Killashandrah Excel Worksheet Functions 2 May 23rd 07 06:49 AM
How do I conditionally format a chart? Midavalo Charts and Charting in Excel 1 February 21st 06 10:10 AM
insert text conditionally and format John Sawyer Excel Discussion (Misc queries) 3 August 17th 05 06:51 PM
conditionally format cells elad Excel Worksheet Functions 2 May 13th 05 03:57 PM
How do I conditionally format a chart? Michelle Excel Discussion (Misc queries) 1 April 12th 05 09:59 PM


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