Formatting of numbers in a cell on another sheet

S

Slashman

Hi,

This prob on my spreadsheet is a pain and I hope there is a solution.

I have a cell that has a mixture of text and numbers. The text comes
through fine, but the numbers only come through as numbers whole ie 300
not 300.00.

EG:

="This weight "&A1&" is in "&A2

A1 is 300.00
A2 is g

The cell displays:

This weight 300 is in g

But I would like it to display:

This weight 300.00 is in g

Thanks for any advice,

Cheers,

Aaron.
 
G

Gord Dibben

="This weight " &TEXT(A1,"#,##0.00")& " is in " & A2


Gord Dibben MS Excel MVP
 
J

Jim Cone

="This weight "&TEXT(A1,"##0.00")&" is in "& A2
--
Jim Cone
San Francisco, USA
http://www.realezsites.com/bus/primitivesoftware



"Slashman" <[email protected]>
wrote in message
Hi,
This prob on my spreadsheet is a pain and I hope there is a solution.
I have a cell that has a mixture of text and numbers. The text comes
through fine, but the numbers only come through as numbers whole ie 300
not 300.00.
EG:

="This weight "&A1&" is in "&A2

A1 is 300.00
A2 is g
The cell displays:
This weight 300 is in g
But I would like it to display:
This weight 300.00 is in g
Thanks for any advice,
Cheers,
Aaron.
 
S

Slashman

Hi,

Thanks everyone for your responses, it works well and is the way I was
currently doing it, but I should have mentioned that I would like to be
able to have the formatting applied through a macro automatically based
on what another cell's decimal placing is.

It isnt always going to be 30.00 sometimes it could be 30.0000 and I
would like to be able to have that automatically apply, but can it be
done by mixing text and number formatting?

Sorry for the mis explanation in the first place.

Cheers,

Aaron.
 

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

Top