I have a worksheet that has 2 columns of information (simplified version).
Column A has a non-sorted, nonlinear, list of part numbers, descriptions and some empty cells.
It is divided into variable row sections by “header” characters. These characters are [1], [2], [3], etc. UP TO [20] (with the brackets)
Column B has the associated quantities of each part.
I would like a macro that will set up columns C,D,E,F,G,H,I,J,K,L so that I can move the part quantities under rows below [1] and above [2] to column C,part quantities under rows below [2] and above [3] to column D, and so on.
When complete, all quantities will be in the same row they originated in, but would shift to the column associated with the “header” character. ( Section [1] quantities in column C., Section [2] quantities in column D.,etc.)
source looks like:
<tbody>
</tbody>
<tbody>
</tbody>
Column A has a non-sorted, nonlinear, list of part numbers, descriptions and some empty cells.
It is divided into variable row sections by “header” characters. These characters are [1], [2], [3], etc. UP TO [20] (with the brackets)
Column B has the associated quantities of each part.
I would like a macro that will set up columns C,D,E,F,G,H,I,J,K,L so that I can move the part quantities under rows below [1] and above [2] to column C,part quantities under rows below [2] and above [3] to column D, and so on.
When complete, all quantities will be in the same row they originated in, but would shift to the column associated with the “header” character. ( Section [1] quantities in column C., Section [2] quantities in column D.,etc.)
source looks like:
A | B | C | D | |
[1] | ||||
part number | quantity | |||
<tbody> </tbody> | 25 | |||
<tbody> </tbody> | 2 | |||
<tbody> </tbody> | 54 | |||
<tbody> </tbody> | 78 | |||
discount | 1 | |||
[2] | ||||
<tbody> </tbody> | 21 | |||
<tbody> </tbody> | 5 | |||
<tbody> </tbody> | 85 | |||
[3] | ||||
<tbody> </tbody> | 4 | |||
<tbody> </tbody> | 75 | |||
<tbody> </tbody> | 35 | |||
[4] | ||||
<tbody> </tbody> | 11 | |||
<tbody> </tbody> | 2 | |||
<tbody> </tbody> | 74 |
<tbody>
</tbody>
resulting worksheet A | B | C | D | E | F | G | H | I | J | K | L |
[1] | |||||||||||
part number | quantity | ||||||||||
32147895 | 25 | 25 | |||||||||
45678451 | 2 | 2 | |||||||||
5264258 | 54 | 54 | |||||||||
12333546 | 78 | 78 | |||||||||
discount | 1 | ||||||||||
[2] | |||||||||||
5687945 | 21 | 21 | |||||||||
34688154 | 5 | 5 | |||||||||
3254687 | 85 | 85 | |||||||||
[3] | |||||||||||
3245678 | 4 | 4 | |||||||||
4568795 | 75 | 75 | |||||||||
1645987 | 35 | 35 | |||||||||
[4] | |||||||||||
8461354 | 11 | 11 | |||||||||
23465879 | 2 | 2 | |||||||||
1648795 | 74 | 74 |
<tbody>
</tbody>