Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 34
Default 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

  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,268
Default 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



  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 10,593
Default 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



  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,202
Default 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


  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 11,501
Default 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




  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 11,058
Default 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


  #7   Report Post  
Posted to microsoft.public.excel.worksheet.functions
bj bj is offline
external usenet poster
 
Posts: 1,397
Default 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


  #8   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 34
Default 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 -


  #9   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 36
Default 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).
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Formula Text String: Formatting Text and Numbers? dj479794 Excel Discussion (Misc queries) 5 June 30th 07 12:19 AM
Column of Numbers in xls to String of Numbers in txt Spyder Excel Discussion (Misc queries) 1 March 15th 06 07:39 PM
finding what numbers are in a string (Day 2) David Excel Worksheet Functions 0 May 26th 05 10:10 PM
string of numbers David Excel Worksheet Functions 1 May 20th 05 08:19 PM
string of numbers BorisS Excel Worksheet Functions 0 May 20th 05 07:16 PM


All times are GMT +1. The time now is 07:20 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"