ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   formatting of numbers within a string (https://www.excelbanter.com/excel-worksheet-functions/164433-formatting-numbers-within-string.html)

Edward

formatting of numbers within a string
 
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


Peo Sjoblom

formatting of numbers within a string
 
="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


"Edward" wrote in message
ups.com...
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




Bob Phillips

formatting of numbers within a string
 
="You have "&TEXT(A1,"#,##0")&" outstanding tickets."


--
---
HTH

Bob

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



"Edward" wrote in message
ups.com...
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




Rick Rothstein \(MVP - VB\)

formatting of numbers within a string
 
You can use the TEXT function to do that.

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

Rick


"Edward" wrote in message
ups.com...
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



Mike H

formatting of numbers within a string
 
Maybe

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

Mike

"Edward" wrote:

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



Gary''s Student

formatting of numbers within a string
 
="some text " & TEXT(A1,"#,##0") & " other text"

where A1 contains the value.
--
Gary''s Student - gsnu200753


"Edward" wrote:

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



bj

formatting of numbers within a string
 
try
= "You have " & text(A1,"#,##0") & " outstanding tickets."


"Edward" wrote:

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



Edward

formatting of numbers within a string
 
Thanks.

On Nov 1, 10:46 am, "Peo Sjoblom" wrote:
="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

"Edward" wrote in message

ups.com...



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- Hide quoted text -


- Show quoted text -



Darren Bartrup[_2_]

formatting of numbers within a string
 
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).


All times are GMT +1. The time now is 06:52 AM.

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