ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Automatically duplicate variables (https://www.excelbanter.com/excel-worksheet-functions/146360-automatically-duplicate-variables.html)

Dina

Automatically duplicate variables
 
I have a large number of variables (header columns) in excel that I need
duplicated with additional versions (ex: 4) - is there a way to do so
automatically in Excel?

Example:
Header Columns: Name | Age | Address | Account Number | etc etc

Need:
Header Columns: Name_1|Name_2|Name_3|Name_4|Age_1|Age_2|Age_3|Age_ 4| etc
etc....

Can this be done automatically?

Many thanks for your help



Ben McBen

Automatically duplicate variables
 
In many ways!
1. Excel is pretty smart - If you enter "Name_1" and then drag the cell
handle over (fill) then it will realise thet 1 needs incrementing and do it
for you.

2. You could use functions:

= "Name_" & column()-2

Assumin your are in column C, when dragged accross it will increment

3. Macros - limitless posibilities


"Dina" wrote:

I have a large number of variables (header columns) in excel that I need
duplicated with additional versions (ex: 4) - is there a way to do so
automatically in Excel?

Example:
Header Columns: Name | Age | Address | Account Number | etc etc

Need:
Header Columns: Name_1|Name_2|Name_3|Name_4|Age_1|Age_2|Age_3|Age_ 4| etc
etc....

Can this be done automatically?

Many thanks for your help



Dina

Automatically duplicate variables
 
Thanks Ben! I guess I should've posted under 'new users' :)

"Ben McBen" wrote:

In many ways!
1. Excel is pretty smart - If you enter "Name_1" and then drag the cell
handle over (fill) then it will realise thet 1 needs incrementing and do it
for you.

2. You could use functions:

= "Name_" & column()-2

Assumin your are in column C, when dragged accross it will increment

3. Macros - limitless posibilities


"Dina" wrote:

I have a large number of variables (header columns) in excel that I need
duplicated with additional versions (ex: 4) - is there a way to do so
automatically in Excel?

Example:
Header Columns: Name | Age | Address | Account Number | etc etc

Need:
Header Columns: Name_1|Name_2|Name_3|Name_4|Age_1|Age_2|Age_3|Age_ 4| etc
etc....

Can this be done automatically?

Many thanks for your help




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

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