I have a spread sheet exported from Quick Books. The data is from purchase orders and inventory. Unfortunately, Quick Books exports the data of "quantity" as a number in the line item. To make price tags and inventory stickers, I need to take the "quantity" field in Excell and convert it to an equal number of rows. The reason I want to do this with a macro or other automated means is there can be 100's of rows of data with item quantities varying from 1 to more than 100. It gets very tedious copying and pasting in this manner. Here is what I would like to accomplish:
Is it possible to do this with a macro by reading the quantity field and then automatically copying and pasting the correct numbers of rows, then change the quantity field to 1?
Thanks for any input.
Book1 | ||||||
---|---|---|---|---|---|---|
A | B | C | D | |||
1 | BEFORE | |||||
2 | ||||||
3 | ITEM | DESCRIPTION | QTY | PRICE | ||
4 | 96-456 | BOLTA | 5 | 3.59 | ||
5 | 96-435 | BOLTB | 6 | 4.07 | ||
6 | 96-567 | BOLTC | 7 | 5.95 | ||
7 | ||||||
8 | ||||||
9 | AFTER | |||||
10 | ||||||
11 | ITEM | DESCRIPTION | QTY | PRICE | ||
12 | 96-456 | BOLTA | 1 | 3.59 | ||
13 | 96-456 | BOLTA | 1 | 3.59 | ||
14 | 96-456 | BOLTA | 1 | 3.59 | ||
15 | 96-456 | BOLTA | 1 | 3.59 | ||
16 | 96-456 | BOLTA | 1 | 3.59 | ||
17 | 96-435 | BOLTB | 1 | 4.07 | ||
18 | 96-435 | BOLTB | 1 | 4.07 | ||
19 | 96-435 | BOLTB | 1 | 4.07 | ||
20 | 96-435 | BOLTB | 1 | 4.07 | ||
21 | 96-435 | BOLTB | 1 | 4.07 | ||
22 | 96-435 | BOLTB | 1 | 4.07 | ||
23 | 96-567 | BOLTC | 1 | 5.95 | ||
24 | 96-567 | BOLTC | 1 | 5.95 | ||
25 | 96-567 | BOLTC | 1 | 5.95 | ||
26 | 96-567 | BOLTC | 1 | 5.95 | ||
27 | 96-567 | BOLTC | 1 | 5.95 | ||
28 | 96-567 | BOLTC | 1 | 5.95 | ||
29 | 96-567 | BOLTC | 1 | 5.95 | ||
Sheet1 |
Is it possible to do this with a macro by reading the quantity field and then automatically copying and pasting the correct numbers of rows, then change the quantity field to 1?
Thanks for any input.