ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Numeric formatting problem (https://www.excelbanter.com/excel-worksheet-functions/27225-numeric-formatting-problem.html)

Metolius Dad

Numeric formatting problem
 
When a calculation goes out to 10 decimal places I can use the cell format to
limit it to 2 places. But when I add (cancatenate ?) text to that
calculation it goes out to 10 places again. How can I make this not happen.

example:
=1/3 shows 0.333333333333
=1/3 shows 0.33 when cell formatted to 2 decimals
=1/3&" ml/hr" shows 0.333333333333 ml/hr EVEN THOUGH THE CELL IS FORMATTED
to only 2 decimal places.

TIA for any help.
Sam

JE McGimpsey

Changing number format doesn't change what's stored in the cell, and
functions operate on stored values, not displayed values. Try using the
TEXT() function instead:

=TEXT(1/3,"0.00") & "ml/hr"

In article ,
Metolius Dad wrote:

When a calculation goes out to 10 decimal places I can use the cell format to
limit it to 2 places. But when I add (cancatenate ?) text to that
calculation it goes out to 10 places again. How can I make this not happen.

example:
=1/3 shows 0.333333333333
=1/3 shows 0.33 when cell formatted to 2 decimals
=1/3&" ml/hr" shows 0.333333333333 ml/hr EVEN THOUGH THE CELL IS FORMATTED
to only 2 decimal places.


Vasant Nanavati

Numeric formatting applies only to numbers and not text.

Try:

=TEXT(1/3,"0.00")&" ml/hr"

--

Vasant

"Metolius Dad" wrote in message
...
When a calculation goes out to 10 decimal places I can use the cell format

to
limit it to 2 places. But when I add (cancatenate ?) text to that
calculation it goes out to 10 places again. How can I make this not

happen.

example:
=1/3 shows 0.333333333333
=1/3 shows 0.33 when cell formatted to 2 decimals
=1/3&" ml/hr" shows 0.333333333333 ml/hr EVEN THOUGH THE CELL IS FORMATTED
to only 2 decimal places.

TIA for any help.
Sam




Ragdyer

Then, there's always the "other" option of rounding:

=ROUND(1/3,2)&" ml/hr"
--
HTH,

RD

---------------------------------------------------------------------------
Please keep all correspondence within the NewsGroup, so all may benefit !
---------------------------------------------------------------------------

"Metolius Dad" wrote in message
...
When a calculation goes out to 10 decimal places I can use the cell format

to
limit it to 2 places. But when I add (cancatenate ?) text to that
calculation it goes out to 10 places again. How can I make this not

happen.

example:
=1/3 shows 0.333333333333
=1/3 shows 0.33 when cell formatted to 2 decimals
=1/3&" ml/hr" shows 0.333333333333 ml/hr EVEN THOUGH THE CELL IS FORMATTED
to only 2 decimal places.

TIA for any help.
Sam




All times are GMT +1. The time now is 03:22 AM.

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