Hi,
I'm trying to achieve the following and hoping someone can help with the VBA.
I need to copy rows a number of times based on a cell quantity and then set the quantity in each row to one.
So something like:
for each row:
if (cell C) > 1:
copy row and insert (cell C - 1) times
change (cell C) in each row to 1
The outcome would change this:
into this:
Hope that makes sense and someone can help
I'm trying to achieve the following and hoping someone can help with the VBA.
I need to copy rows a number of times based on a cell quantity and then set the quantity in each row to one.
So something like:
for each row:
if (cell C) > 1:
copy row and insert (cell C - 1) times
change (cell C) in each row to 1
The outcome would change this:
aaaa | aaaa | 3 | aaaa | aaaa | aaaa |
bbbb | bbbb | 2 | bbbb | bbbb | bbbb |
cccc | cccc | 1 | cccc | cccc | cccc |
dddd | dddd | 2 | dddd | dddd | dddd |
into this:
aaaa | aaaa | 1 | aaaa | aaaa | aaaa |
aaaa | aaaa | 1 | aaaa | aaaa | aaaa |
aaaa | aaaa | 1 | aaaa | aaaa | aaaa |
bbbb | bbbb | 1 | bbbb | bbbb | bbbb |
bbbb | bbbb | 1 | bbbb | bbbb | bbbb |
cccc | cccc | 1 | cccc | cccc | cccc |
dddd | dddd | 1 | dddd | dddd | dddd |
dddd | dddd | 1 | dddd | dddd | dddd |
Hope that makes sense and someone can help