ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Show formulas result + text directly (https://www.excelbanter.com/excel-worksheet-functions/180692-show-formulas-result-text-directly.html)

veggies27

Show formulas result + text directly
 
I'd like to show the result of a formula in a cell and then directly tack on
some standard text.

I want to show a cell that divides a cost by a unit to find a unit cost,
then (in the same cell as the unit cost), add " /unit" or something similar.

Is this possible without using a bunch of extra cells?



Jim Cone

Show formulas result + text directly
 

You can just add the text to the end of the formula, but then the
cell value becomes text...
=A1/3 &" units"
-or-
You can use the "N" function and the text will appear only in the
formula bar, however the cell value remains numeric...
=A1/3 &N("the unit of measure is units")
--
Jim Cone
San Francisco, USA
http://www.realezsites.com/bus/primitivesoftware
(Excel Add-ins / Excel Programming)




"veggies27"
wrote in message
I'd like to show the result of a formula in a cell and then directly tack on
some standard text.

I want to show a cell that divides a cost by a unit to find a unit cost,
then (in the same cell as the unit cost), add " /unit" or something similar.

Is this possible without using a bunch of extra cells?



T. Valko

Show formulas result + text directly
 
Try it like this:

=A1/B1&" /unit"

Depending on what the values of A1 and B1 are you may want to round the
result. for example:

A1 = 10
B1 = 3

=A1/B1&" /unit"

Will result in: 3.33333333333333 /unit

So:

=ROUND(A1/B1,2)&" /unit"

Will result in: 3.33 /unit

You might also want to make sure there are values in A1 and/or B1:


=IF(COUNT(A1:B1)<2,"",ROUND(A1/B1,2)&" /unit")


--
Biff
Microsoft Excel MVP


"veggies27" wrote in message
...
I'd like to show the result of a formula in a cell and then directly tack
on
some standard text.

I want to show a cell that divides a cost by a unit to find a unit cost,
then (in the same cell as the unit cost), add " /unit" or something
similar.

Is this possible without using a bunch of extra cells?





Gord Dibben

Show formulas result + text directly
 
FormatCellsNumberCustom

0.00"/unit"


Gord Dibben MS Excel MVP

On Wed, 19 Mar 2008 17:56:34 -0700, veggies27
wrote:

I'd like to show the result of a formula in a cell and then directly tack on
some standard text.

I want to show a cell that divides a cost by a unit to find a unit cost,
then (in the same cell as the unit cost), add " /unit" or something similar.

Is this possible without using a bunch of extra cells?





All times are GMT +1. The time now is 10:30 PM.

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