Formatting Question

  • Thread starter Thread starter M.Siler
  • Start date Start date
M

M.Siler

I have the following:

=IF((B21-C21)>0,B21-C21 & " Under Budget", B21-C21 & " Over Budget")

How can I get the resulting value to be formatted as currency? I have
formatted the cell as currency but I guess with the & "text" it doesn't
treat the numerical part as currency.
 
You are correct. So to overcome that, Put your currency symbol into the
formula too.

=IF((B21-C21)>0,"$"&B21-C21 & " Under Budget", "$"&B21-C21 & " Over Budget")
 
Or, you could do it this way:-

=IF((B21-C21)>0,DOLLAR(B21-C21,2) & " Under Budget", DOLLAR(B21-C21,2) & "
Over Budget")
 
One way:

=TEXT(B21-C21,"$0.00_) ;($0.00) ") & IF(B21>C21,"Under","Over") & "
Budget"

Another:

=B21-C21

Format with Format/Cells/Number/Custom

$0.00_) "Under Budget";($0.00) "Over Budget";0.00_) "On Budget"
 
Back
Top