Andreas Hermle
asked on
Copying data records by a certain number of time using VBA
Dear Experts:
A copying macro should perform the following tasks:
Run from C2 till the last filled cell in Column C
Take the number of the individual cells in Column C as the number of copies by which the data record is to be copied down (-1)
For example the 'Scissor data' should be listed three times, the Spoon record is to be listed 4 times and the fork record is to be listed twice after running the macro:
Before running macro:
Column A Column B Column C
Item_No Description Number
17-54 Scissor 3
17-55 Spoon 4
17-56 Fork 2
After running macro:
Item_No Description Number
17-54 Scissor 3
17-54 Scissor 3
17-54 Scissor 3
17-55 Spoon 4
17-55 Spoon 4
17-55 Spoon 4
17-55 Spoon 4
17-56 Fork 2
17-56 Fork 2
Help is much appreciated. Thank you very much in advance.
I have attached a sample file for your convenience.
Regards, Andreas
Replicate-Data-Records-using-VBA.xlsm
A copying macro should perform the following tasks:
Run from C2 till the last filled cell in Column C
Take the number of the individual cells in Column C as the number of copies by which the data record is to be copied down (-1)
For example the 'Scissor data' should be listed three times, the Spoon record is to be listed 4 times and the fork record is to be listed twice after running the macro:
Before running macro:
Column A Column B Column C
Item_No Description Number
17-54 Scissor 3
17-55 Spoon 4
17-56 Fork 2
After running macro:
Item_No Description Number
17-54 Scissor 3
17-54 Scissor 3
17-54 Scissor 3
17-55 Spoon 4
17-55 Spoon 4
17-55 Spoon 4
17-55 Spoon 4
17-56 Fork 2
17-56 Fork 2
Help is much appreciated. Thank you very much in advance.
I have attached a sample file for your convenience.
Regards, Andreas
Replicate-Data-Records-using-VBA.xlsm
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Great job from all of you. All of them work. I am really glad and you saved my day.
ASKER
Thank you very much for your swift and professional help. You saved me lots and lots of time. What a forum!!! ;-)
ASKER
Thank you so much.
Regards, Andreas