I have an excel workbook where column G is going to list the total number of boxes, if that value is 1 no action is needed, if that number is greater than 1, I need to duplicate the data until the number of rows for that data = the total number of boxes, and increment the value in column E each row.
I'm sure this is confusing so I am attaching a sample workbook with my current format (described above) and once manipulated the desired format as a worksheet.
Thanks to all!
Seems I can't upload a workbook so here are images:
You can use XL2BB to post samples to the board so that we don't have to retype them (see link in my signature block below this reply).
Here's a way of doing what you want by using a helper column to keep a running total of the number of boxes in the source table (column E) with the output starting in column G. I've used a simplified example but it should be enough to give you an idea of how it works.
@jasonb75 - thanks for the help, very close to what I need. I've followed your signature to learn the xl2bb tool so I can provide usable sample data
This is what my source data looks like
sampledata.xlsx
A
B
C
D
E
F
G
H
1
saleid
UserName
num of items
item description
box number
QFB
total boxes
mgr
2
331
pam123
5
socks
1
4
6
xya
3
181
zen129
2
mittens
1
2
1
aym
4
64
mlb202
8
ovens
1
2
1
sua
Current Format
And this is how I need it formatted:
sampledata.xlsx
A
B
C
D
E
F
G
H
1
saleid
UserName
num of items
item description
box number
QFB
total boxes
mgr
2
331
pam123
5
socks
1
4
6
xya
3
331
pam123
5
socks
2
4
6
xya
4
331
pam123
5
socks
3
4
6
xya
5
331
pam123
5
socks
4
4
6
xya
6
331
pam123
5
socks
5
4
6
xya
7
331
pam123
5
socks
6
4
6
xya
8
181
zen129
2
mittens
1
2
1
aym
9
64
mlb202
8
ovens
1
2
1
sua
Desired Format
Only thing missing from the formula you provided (which is KILLER bc I didn't know you could do that in a formula) is the incremental column showing the box number
We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel
Which adblocker are you using?
Disable AdBlock
Follow these easy steps to disable AdBlock
1)Click on the icon in the browser’s toolbar. 2)Click on the icon in the browser’s toolbar. 2)Click on the "Pause on this site" option.
Go back
Disable AdBlock Plus
Follow these easy steps to disable AdBlock Plus
1)Click on the icon in the browser’s toolbar. 2)Click on the toggle to disable it for "mrexcel.com".
Go back
Disable uBlock Origin
Follow these easy steps to disable uBlock Origin
1)Click on the icon in the browser’s toolbar. 2)Click on the "Power" button. 3)Click on the "Refresh" button.
Go back
Disable uBlock
Follow these easy steps to disable uBlock
1)Click on the icon in the browser’s toolbar. 2)Click on the "Power" button. 3)Click on the "Refresh" button.