Show formulas result + text directly

  • Thread starter Thread starter veggies27
  • Start date Start date
V

veggies27

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?
 
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?
 
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")
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top