ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Concatenate (https://www.excelbanter.com/excel-programming/415525-concatenate.html)

Pawan

Concatenate
 
Hello...

I have a worksheet with several columns in it. I want to add a new column
at the beginning. Then I need to concatenate three columns with specific
headings. e.g. from all the columns, I have to concatenate columns with
headings "ID", "Name" and "Place". (The sequence of these columns is not
fixed in the worksheet).

ID KEY NAME JOB PLACE
100 500 JOHN T NY
123 567 MARIA P SF

In this case, the new column should be created before "ID" and its contents
will be "100JOHNNY", "123MARIASF" and so on.

Is there any macro to do this automatically?

Thank You
Regards,
Pawan

Tausif

Concatenate
 
Hi,

Why use a macro when u can simply use a formula ?

Assuming the order of the headings is always the same.
=B1&D1&F1 (where B=ID, D=Name, F=Place)

& copy/paste the formula till where you need it.
HTH,
--
Tausif Mohammed


"Pawan" wrote:

Hello...

I have a worksheet with several columns in it. I want to add a new column
at the beginning. Then I need to concatenate three columns with specific
headings. e.g. from all the columns, I have to concatenate columns with
headings "ID", "Name" and "Place". (The sequence of these columns is not
fixed in the worksheet).

ID KEY NAME JOB PLACE
100 500 JOHN T NY
123 567 MARIA P SF

In this case, the new column should be created before "ID" and its contents
will be "100JOHNNY", "123MARIASF" and so on.

Is there any macro to do this automatically?

Thank You
Regards,
Pawan


Pawan

Concatenate
 
Because, there are number of activities to do with such kind of worksheets
and this is one of them. Manually doing this will take a lot of time.

"Tausif" wrote:

Hi,

Why use a macro when u can simply use a formula ?

Assuming the order of the headings is always the same.
=B1&D1&F1 (where B=ID, D=Name, F=Place)

& copy/paste the formula till where you need it.
HTH,
--
Tausif Mohammed


"Pawan" wrote:

Hello...

I have a worksheet with several columns in it. I want to add a new column
at the beginning. Then I need to concatenate three columns with specific
headings. e.g. from all the columns, I have to concatenate columns with
headings "ID", "Name" and "Place". (The sequence of these columns is not
fixed in the worksheet).

ID KEY NAME JOB PLACE
100 500 JOHN T NY
123 567 MARIA P SF

In this case, the new column should be created before "ID" and its contents
will be "100JOHNNY", "123MARIASF" and so on.

Is there any macro to do this automatically?

Thank You
Regards,
Pawan



All times are GMT +1. The time now is 07:21 PM.

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