Calculation within Text

  • Thread starter Thread starter GeorgeF
  • Start date Start date
G

GeorgeF

I have a calculation inserted within a line of text. I'm using the
following: ="Text1"&A10&"Text2" The Text is printing fine, but how do
I control the number of digits to the right of the decimal that are
displayed by A10? A10 is a calculation of two other cells that
periodically change in value and have variable decimal length.
 
Hi George

="Text1"&TEXT(A10,"#.00")&"Text2"

Or use some other formatting string; examples can be found in the Format
menu, if you choose Custom
 
="Text1"&TEXT(A10,"#,##0.00")&"Text2"

--

HTH

RP
(remove nothere from the email address if mailing direct)
 
Try using the ROUND function:

=("Text 1"&ROUND(A23,2)&"Text 2")

If A23 were 20.77777 it would only round out to 2 places and return

Text 120.78Text 2

If you want it to be 20.77 then use ROUNDDOWN instead of ROUND

=("Text 1"&ROUNDDOWN(A23,2)&"Text 2") returns

Text 120.77Text 2

Cheers,

Stev
 
I have a calculation inserted within a line of text. I'm using the
following: ="Text1"&A10&"Text2" The Text is printing fine, but how do
I control the number of digits to the right of the decimal that are
displayed by A10? A10 is a calculation of two other cells that
periodically change in value and have variable decimal length.

Take a look at the TEXT worksheet function HELP information. You can use any
acceptable 'custom' format.

eg:

="Text1"& TEXT(A10,"0.00") &"Text2"


--ron
 
Thanks to: SteveG, Niek Otten, Bob Phillips and Ron Rosenfeld,
This sounds like almost too small problem to throw out to you
great problem solvers. It has been bothering me for some time as I have
fumbled with various non-solutions. Now I have multiple answers.
Thanks to all again.
GeorgeF
 
You can tell by the multitude of responses that we were more than happy to
help :-))

Bob
 

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