formatting of numbers within a string

E

Edward

I need to copy data from a cell into a string. The data is numeric.
I want to format this number in the string. How can I do that without
writing my own complicated format function?

For example:

A1: 12345
B1: "You have " & A1 & " outstanding tickets."

I want B1 to say "You have 12,345 outstanding tickets" not "You have
12345 outstanding tickets".

Thanks.

Edward
 
P

Peo Sjoblom

="You have "&TEXT(A1,"#,##0")&" outstanding tickets"

you can do the same for any other formatting like percentage and currency
etc


="You owe me "&TEXT(A1,"$#,##0")&" and you better cough it up or you'll end
up as fish food"


--


Regards,


Peo Sjoblom
 
B

Bob Phillips

="You have "&TEXT(A1,"#,##0")&" outstanding tickets."


--
---
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)
 
R

Rick Rothstein \(MVP - VB\)

You can use the TEXT function to do that.

="You have "&TEXT(A1,"#,##0")&" outstanding tickets."

Rick
 
E

Edward

Thanks.

="You have "&TEXT(A1,"#,##0")&" outstanding tickets"

you can do the same for any other formatting like percentage and currency
etc

="You owe me "&TEXT(A1,"$#,##0")&" and you better cough it up or you'll end
up as fish food"

--

Regards,

Peo Sjoblom









- Show quoted text -
 
G

Guest

Or you could ignore the formula in cell B1 and give cell A1 the custom format
of:

"You have" #,### "outstanding tickets."

Then just type the number in cell A1 as normal (the formatting will add the
rest).
 

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