Formatting cell with text and formula

  • Thread starter AHizon via OfficeKB.com
  • Start date
A

AHizon via OfficeKB.com

I have the below formula:
=IF(K52=181044, "OK", "Off $" & 181044-K52)

Even after I format the cell to not have decimals, it still displays the
decimals to the 13th exponential. How can I set it so that it maxes at 2
decimals even if the cell has text and numerical value?
 
F

FSt1

hi
when you mix text with numbesr, you loose the normal format abilities and
generally have to force formating on the number parts.
try something like this
=IF(K52=181044, "OK", "Off $" & Round(181044-K52,2))

regards
FSt1
 
D

Dave Peterson

Maybe..

=IF(K52=181044, "OK", "Off $" & text(181044-K52,"#,##0.00")

Number formatting only works on cells that have numbers. This is a combination
of text (Off $) and numbers--so it's treated as text.
 
R

Ron Rosenfeld

I have the below formula:
=IF(K52=181044, "OK", "Off $" & 181044-K52)

Even after I format the cell to not have decimals, it still displays the
decimals to the 13th exponential. How can I set it so that it maxes at 2
decimals even if the cell has text and numerical value?

Maybe:

=IF(K52=181044, "OK", "Off "&TEXT(181044-K52,"$#,##0.00"))

--ron
 
A

AHizon via OfficeKB.com

Awesome....all options worked to what I needed. Thank you all for your
suggestions.
 
Top