PC Review


Reply
Thread Tools Rate Thread

Concatenation of Text

 
 
Chris Hankin
Guest
Posts: n/a
 
      10th Nov 2008

Hello, could someone please help me with a formula or macro to
concatenate columns Q and R and put the results into column S?

I am using Excel 2003 and have 4-digit numbers in column Q that are
formatted as Text. I also have 9-digit numbers in column R that are
formatted as Text. I need to concatenate the numbers so that they form
a 13-digit number in column S.

Once this is achieved, I need to format these 13-digit numbers in
####-##-###-#### format.

Example:

Column Q: 5830
Column R: 019640028

Column S: 5830019640028

After formatting: 5830-01-964-0028

The data starts at Q2 and R2 respectively.

Any help would be greatly appreciated.

Kind regards,

Chris.



*** Sent via Developersdex http://www.developersdex.com ***
 
Reply With Quote
 
 
 
 
OssieMac
Guest
Posts: n/a
 
      10th Nov 2008
Hi Chris,

=Q2&"-"&LEFT(R2,2)&"-"&MID(R2,3,3)&"-"&RIGHT(R2,4)

--
Regards,

OssieMac


"Chris Hankin" wrote:

>
> Hello, could someone please help me with a formula or macro to
> concatenate columns Q and R and put the results into column S?
>
> I am using Excel 2003 and have 4-digit numbers in column Q that are
> formatted as Text. I also have 9-digit numbers in column R that are
> formatted as Text. I need to concatenate the numbers so that they form
> a 13-digit number in column S.
>
> Once this is achieved, I need to format these 13-digit numbers in
> ####-##-###-#### format.
>
> Example:
>
> Column Q: 5830
> Column R: 019640028
>
> Column S: 5830019640028
>
> After formatting: 5830-01-964-0028
>
> The data starts at Q2 and R2 respectively.
>
> Any help would be greatly appreciated.
>
> Kind regards,
>
> Chris.
>
>
>
> *** Sent via Developersdex http://www.developersdex.com ***
>

 
Reply With Quote
 
Rick Rothstein
Guest
Posts: n/a
 
      10th Nov 2008
Use this formula in S1...

=--(Q1&R1)

and copy it down; format the column using this Custom Format...

0000-00-000-0000

--
Rick (MVP - Excel)


"Chris Hankin" <(E-Mail Removed)> wrote in message
news:uWW%(E-Mail Removed)...
>
> Hello, could someone please help me with a formula or macro to
> concatenate columns Q and R and put the results into column S?
>
> I am using Excel 2003 and have 4-digit numbers in column Q that are
> formatted as Text. I also have 9-digit numbers in column R that are
> formatted as Text. I need to concatenate the numbers so that they form
> a 13-digit number in column S.
>
> Once this is achieved, I need to format these 13-digit numbers in
> ####-##-###-#### format.
>
> Example:
>
> Column Q: 5830
> Column R: 019640028
>
> Column S: 5830019640028
>
> After formatting: 5830-01-964-0028
>
> The data starts at Q2 and R2 respectively.
>
> Any help would be greatly appreciated.
>
> Kind regards,
>
> Chris.
>
>
>
> *** Sent via Developersdex http://www.developersdex.com ***


 
Reply With Quote
 
Chris Hankin
Guest
Posts: n/a
 
      11th Nov 2008
Thanks OzzieMac - your formula works very well - greatly appreciated.

Kind regards,

Chris.



*** Sent via Developersdex http://www.developersdex.com ***
 
Reply With Quote
 
Chris Hankin
Guest
Posts: n/a
 
      11th Nov 2008
Thanks Rick for your help - very much appreciated.

Kind regards,

Chris.



*** Sent via Developersdex http://www.developersdex.com ***
 
Reply With Quote
 
Rick Rothstein
Guest
Posts: n/a
 
      11th Nov 2008
For the archives, this is a little bit more compact...

=TEXT(--(Q2&R2),"0000-00-000-0000")

--
Rick (MVP - Excel)


"OssieMac" <(E-Mail Removed)> wrote in message
news:82E83249-0F04-47F9-AA63-(E-Mail Removed)...
> Hi Chris,
>
> =Q2&"-"&LEFT(R2,2)&"-"&MID(R2,3,3)&"-"&RIGHT(R2,4)
>
> --
> Regards,
>
> OssieMac
>
>
> "Chris Hankin" wrote:
>
>>
>> Hello, could someone please help me with a formula or macro to
>> concatenate columns Q and R and put the results into column S?
>>
>> I am using Excel 2003 and have 4-digit numbers in column Q that are
>> formatted as Text. I also have 9-digit numbers in column R that are
>> formatted as Text. I need to concatenate the numbers so that they form
>> a 13-digit number in column S.
>>
>> Once this is achieved, I need to format these 13-digit numbers in
>> ####-##-###-#### format.
>>
>> Example:
>>
>> Column Q: 5830
>> Column R: 019640028
>>
>> Column S: 5830019640028
>>
>> After formatting: 5830-01-964-0028
>>
>> The data starts at Q2 and R2 respectively.
>>
>> Any help would be greatly appreciated.
>>
>> Kind regards,
>>
>> Chris.
>>
>>
>>
>> *** Sent via Developersdex http://www.developersdex.com ***
>>


 
Reply With Quote
 
Chris Hankin
Guest
Posts: n/a
 
      11th Nov 2008
Thanks again Rick for your help - very much appreciated.

Kind regards,

Chris.



*** Sent via Developersdex http://www.developersdex.com ***
 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
text and date concatenation vrzimmerm@hotmail.com Microsoft Excel Discussion 1 21st Sep 2007 01:43 PM
Text fields concatenation =?Utf-8?B?WmFjaHJ5MQ==?= Microsoft Access 3 29th Aug 2006 02:30 PM
How to stop text concatenation? Beemer Microsoft Outlook 7 13th Apr 2006 06:48 AM
date and text concatenation littleps Microsoft Excel New Users 8 28th Jul 2005 11:23 AM
Need Value of Concatenation not the Text Darren Microsoft Excel Worksheet Functions 1 1st Oct 2003 11:32 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 10:23 AM.