$ 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.
 
One way:

....&ROUND((G8-H8),2),...&ROUND((H8-G8),2))

Regards

Trevor
 
=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)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top