$ format within if statement

  • Thread starter Thread starter rhodyman10
  • Start date Start date
R

rhodyman10

I am using Microsoft Excel 2000 for a financial spreadsheet.

I want to compare two different financial computations and see which is
higher for each row.

My "if" statement looks like this:

=IF(G8>H8,"Category A is higher by $"&(G8-H8),"Category B is higher
with $"&(H8-G8))

The problem is, sometimes the dollar amounts are showing with three
decimal places, and I only want to show two for dollars.

For example, it may say:

"Category A is higher with $201.098"

How do I get it to show only two decimal places?

Thank you in advance for your help.
 
=IF(G8>H8,"Category A is higher by $"&TEXT(G8-H8,"#,##0/00"),"Category B is
higher with $"&TEXT(H8-G8,"#,##0.00"))

--

HTH

RP
(remove nothere from the email address if mailing direct)
 
Back
Top