Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
loulou
 
Posts: n/a
Default Formating with a formula

I have a formula and then a label concatenated onto the end which works fine
but now I realize I have to format the numeric portion since it is working
with too many decimals. I know how to do this in access but not excel.

The formula is:
=IF(F10-H100,(F10-H10) &" LOSS",(H10-F10) & " PROFIT")

In msaccess, I would just add:
=IF(F10-H100,format((F10-H10),"fixed") &" LOSS",format((F10-H10),"Fixed") &
" PROFIT")

How do I do this in excel??

  #2   Report Post  
Posted to microsoft.public.excel.misc
Kevin B
 
Posts: n/a
Default Formating with a formula



Convert the subtraction to a string and then format the string using a
format mask.

Your True/False statements currenlty look like this:

(F10-H10) &" LOSS",(H10-F10) & " PROFIT"

Change them to:

TEXT((F10-H10),"$#,##0.00") &" LOSS",TEXT((H10-F10),"$#,##0.00") & " PROFIT")
--
Kevin Backmann


"loulou" wrote:

I have a formula and then a label concatenated onto the end which works fine
but now I realize I have to format the numeric portion since it is working
with too many decimals. I know how to do this in access but not excel.

The formula is:
=IF(F10-H100,(F10-H10) &" LOSS",(H10-F10) & " PROFIT")

In msaccess, I would just add:
=IF(F10-H100,format((F10-H10),"fixed") &" LOSS",format((F10-H10),"Fixed") &
" PROFIT")

How do I do this in excel??

  #3   Report Post  
Posted to microsoft.public.excel.misc
Dave O
 
Posts: n/a
Default Formating with a formula

Try this one:
=TEXT(F10-H10,"$0.00")&IF(F10-H100," Loss"," Profit")

How likely is it that F10-H10 will equal zero? In this scenario, a
result of zero will be labeled as "Profit", just fyi.

  #4   Report Post  
Posted to microsoft.public.excel.misc
Andrew Taylor
 
Posts: n/a
Default Formating with a formula

Loulou, try
=TEXT(ABS(F10-H10),"0.00") & IF(F10-H100," LOSS"," PROFIT")

(this gives 2 decimal places)

Andrew


loulou wrote:
I have a formula and then a label concatenated onto the end which works fine
but now I realize I have to format the numeric portion since it is working
with too many decimals. I know how to do this in access but not excel.

The formula is:
=IF(F10-H100,(F10-H10) &" LOSS",(H10-F10) & " PROFIT")

In msaccess, I would just add:
=IF(F10-H100,format((F10-H10),"fixed") &" LOSS",format((F10-H10),"Fixed") &
" PROFIT")

How do I do this in excel??


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
Is it possible? DakotaNJ Excel Worksheet Functions 25 September 18th 06 09:30 PM
Conditional formating using array formula?? Andre Croteau Excel Discussion (Misc queries) 1 February 10th 06 09:43 PM
Dynamic Range with unused formula messing up x axis on dynamic graph [email protected] Charts and Charting in Excel 2 February 2nd 06 08:02 PM
How to check for a bold text formating through (in) a formula? Dmitry Kopnichev Excel Discussion (Misc queries) 6 January 25th 06 04:23 PM
How to check for a bold text formating through (in) a formula? Dmitry Kopnichev Excel Worksheet Functions 6 January 25th 06 04:23 PM


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

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"