Dear all,
Currently I have an excel table where I have a macro that based on a certain value in a cell (> 1), it will copy, insert new row and paste the entire row x number of times based on the value in the column "COUNT".
What I need help with is I don't want the row to be copied exactly, but based on the value in "COUNT", for each paste the row will contain only one input value with the following pattern. It's hard to explain, so I hope the table below explains it.
Current macro:
BEFORE
[TABLE="width: 500"]
<tbody>[TR]
[TD]count[/TD]
[TD]input[/TD]
[TD]input[/TD]
[TD]input[/TD]
[/TR]
[TR]
[TD]3[/TD]
[TD]A[/TD]
[TD]A[/TD]
[TD]A[/TD]
[/TR]
</tbody>[/TABLE]
AFTER
[TABLE="width: 500"]
<tbody>[TR]
[TD]3[/TD]
[TD]A[/TD]
[TD]A[/TD]
[TD]A[/TD]
[/TR]
[TR]
[TD]3[/TD]
[TD]A[/TD]
[TD]A[/TD]
[TD]A[/TD]
[/TR]
[TR]
[TD]3[/TD]
[TD]A[/TD]
[TD]A[/TD]
[TD]A[/TD]
[/TR]
[TR]
[TD]3[/TD]
[TD]A[/TD]
[TD]A[/TD]
[TD]A[/TD]
[/TR]
</tbody>[/TABLE]
what I would like the macro to do:
BEFORE
[TABLE="width: 500"]
<tbody>[TR]
[TD]count[/TD]
[TD]input[/TD]
[TD]input[/TD]
[TD]input[/TD]
[/TR]
[TR]
[TD]3[/TD]
[TD]A[/TD]
[TD]A[/TD]
[TD]A[/TD]
[/TR]
</tbody>[/TABLE]
AFTER
[TABLE="width: 500"]
<tbody>[TR]
[TD]3[/TD]
[TD]A[/TD]
[TD]A[/TD]
[TD]A[/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD]A[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD][/TD]
[TD]A[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD][/TD]
[TD][/TD]
[TD]A[/TD]
[/TR]
</tbody>[/TABLE]
So if the value is 10, I want the macro to copy it 10 times but each row has only one input value if an offset of 1.
Attached is the excel with the current macro and an example how I wish it works.
https://app.box.com/s/s6mcnoclbtvgx0j20xwj
Thank you for your help!
BR,
T0NT0
Currently I have an excel table where I have a macro that based on a certain value in a cell (> 1), it will copy, insert new row and paste the entire row x number of times based on the value in the column "COUNT".
What I need help with is I don't want the row to be copied exactly, but based on the value in "COUNT", for each paste the row will contain only one input value with the following pattern. It's hard to explain, so I hope the table below explains it.
Current macro:
BEFORE
[TABLE="width: 500"]
<tbody>[TR]
[TD]count[/TD]
[TD]input[/TD]
[TD]input[/TD]
[TD]input[/TD]
[/TR]
[TR]
[TD]3[/TD]
[TD]A[/TD]
[TD]A[/TD]
[TD]A[/TD]
[/TR]
</tbody>[/TABLE]
AFTER
[TABLE="width: 500"]
<tbody>[TR]
[TD]3[/TD]
[TD]A[/TD]
[TD]A[/TD]
[TD]A[/TD]
[/TR]
[TR]
[TD]3[/TD]
[TD]A[/TD]
[TD]A[/TD]
[TD]A[/TD]
[/TR]
[TR]
[TD]3[/TD]
[TD]A[/TD]
[TD]A[/TD]
[TD]A[/TD]
[/TR]
[TR]
[TD]3[/TD]
[TD]A[/TD]
[TD]A[/TD]
[TD]A[/TD]
[/TR]
</tbody>[/TABLE]
what I would like the macro to do:
BEFORE
[TABLE="width: 500"]
<tbody>[TR]
[TD]count[/TD]
[TD]input[/TD]
[TD]input[/TD]
[TD]input[/TD]
[/TR]
[TR]
[TD]3[/TD]
[TD]A[/TD]
[TD]A[/TD]
[TD]A[/TD]
[/TR]
</tbody>[/TABLE]
AFTER
[TABLE="width: 500"]
<tbody>[TR]
[TD]3[/TD]
[TD]A[/TD]
[TD]A[/TD]
[TD]A[/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD]A[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD][/TD]
[TD]A[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD][/TD]
[TD][/TD]
[TD]A[/TD]
[/TR]
</tbody>[/TABLE]
So if the value is 10, I want the macro to copy it 10 times but each row has only one input value if an offset of 1.
Attached is the excel with the current macro and an example how I wish it works.
https://app.box.com/s/s6mcnoclbtvgx0j20xwj
Thank you for your help!
BR,
T0NT0