ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Formatting cell with text and formula (https://www.excelbanter.com/excel-discussion-misc-queries/205613-formatting-cell-text-formula.html)

AHizon via OfficeKB.com

Formatting cell with text and formula
 
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?

--
Message posted via OfficeKB.com
http://www.officekb.com/Uwe/Forums.a...excel/200810/1


FSt1

Formatting cell with text and formula
 
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

"AHizon via OfficeKB.com" wrote:

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?

--
Message posted via OfficeKB.com
http://www.officekb.com/Uwe/Forums.a...excel/200810/1



Dave Peterson

Formatting cell with text and formula
 
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.

"AHizon via OfficeKB.com" wrote:

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?

--
Message posted via OfficeKB.com
http://www.officekb.com/Uwe/Forums.a...excel/200810/1


--

Dave Peterson

Ron Rosenfeld

Formatting cell with text and formula
 
On Wed, 08 Oct 2008 23:56:57 GMT, "AHizon via OfficeKB.com" <u38169@uwe wrote:

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

AHizon via OfficeKB.com

Formatting cell with text and formula
 
Awesome....all options worked to what I needed. Thank you all for your
suggestions.

Ron Rosenfeld wrote:
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


--
Message posted via http://www.officekb.com



All times are GMT +1. The time now is 09:13 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com