Convert single PO line item to multiple rows based on quantity ordered

MattsDad

New Member
Joined
Sep 1, 2010
Messages
14
Hi. I'm trying to build a process to aid our warehouse in printing barcode labels for inventory received. Currently someone has to take the PO/receiving document and manually enter the part number into a text file on a separate row for each individual piece that is received so our barcode printer can print the correct label to attach to our product.

For example, on a basic receiving document we receive 3 units of Item A and 1 unit of Item B that shows like this:
Item Qty
A 3
B 1

The warehouse worker then enters the data like this in the text file that will be printed:
A
A
A
B

The question is, can i do this in Excel 2003 on an XP box? We can easily import this data from the PO/receiving report to Excel, which I have done. I'm trying to figure out how to get Excel to create an output file either directly to a text file or to another tab in the workbook but I don't know how to instruct Excel to use one line of input as a source for more than one line of output.

I've spent several hours trying formulas to no avail. I don't know enough about VBA code to be able to write this myself. Any help you can give will be greatly appreciated.
 
.. im sorry for disturbing you many times
No need to apologise. You are not disturbing me - I come to the forum because I want to answer questions. :biggrin:


can i do this functions with macro codes ?
That is what we have already done. :)


with any formulas ? :)
To do it with formulas, I would use a helper column.
F1 has a stand-alone formula
F2 copied down
The other row 2 formulas are all copied down as far as you might need.

Excel Workbook
ABCDEFGHIJKLMNOP
1ORDER_NUMBERSKUDESCRIPTIONORDERED_QUANTITYDELIVERY_METHOD10OrderSKUItem DescriptionQTYSerial Numbers18 DigitSR NumberReleased ByDelivery MethodOrder Status
25004811112170313iPhone 7 32GB Matte Black Local2MovEx15004811112170313iPhone 7 32GB Matte Black Local1MovEx
35004828112170379IPhone 6 32GB Grey LTE/ Local2ELT Driver35004811112170313iPhone 7 32GB Matte Black Local1MovEx
45004845112170387iPhone 8 Plus 64GB Space Grey /Local2Sales55004828112170379IPhone 6 32GB Grey LTE/ Local1ELT Driver
55004714112170402Iphone X 256 GB Silver /Local2NokSmart75004828112170379IPhone 6 32GB Grey LTE/ Local1ELT Driver
65004710112170404IPhone X 256 GB Space Gray/Local2Union Courier95004845112170387iPhone 8 Plus 64GB Space Grey /Local1Sales
75004845112170387iPhone 8 Plus 64GB Space Grey /Local1Sales
85004714112170402Iphone X 256 GB Silver /Local1NokSmart
95004714112170402Iphone X 256 GB Silver /Local1NokSmart
105004710112170404IPhone X 256 GB Space Gray/Local1Union Courier
115004710112170404IPhone X 256 GB Space Gray/Local1Union Courier
12
Sheet3
 
Last edited:
Upvote 0

Excel Facts

Format cells as time
Select range and press Ctrl+Shift+2 to format cells as time. (Shift 2 is the @ sign).
it was awesome you're a genius its working with these formulas very well with my modification ;) so can i put the order number in the result just once per each order from expected data ?
 
Upvote 0
Try these altered formulas for column G onwards.

Excel Workbook
ABCDEFGHIJO
1ORDER_NUMBERSKUDESCRIPTIONORDERED_QUANTITYDELIVERY_METHOD10OrderSKUItem DescriptionQTYDelivery Method
25004811112170313iPhone 7 32GB Matte Black Local2MovEx15004811112170313iPhone 7 32GB Matte Black Local1MovEx
35004828112170379IPhone 6 32GB Grey LTE/ Local2ELT Driver3112170313iPhone 7 32GB Matte Black Local1MovEx
45004845112170387iPhone 8 Plus 64GB Space Grey /Local2Sales55004828112170379IPhone 6 32GB Grey LTE/ Local1ELT Driver
55004714112170402Iphone X 256 GB Silver /Local2NokSmart7112170379IPhone 6 32GB Grey LTE/ Local1ELT Driver
65004710112170404IPhone X 256 GB Space Gray/Local2Union Courier95004845112170387iPhone 8 Plus 64GB Space Grey /Local1Sales
7112170387iPhone 8 Plus 64GB Space Grey /Local1Sales
85004714112170402Iphone X 256 GB Silver /Local1NokSmart
9112170402Iphone X 256 GB Silver /Local1NokSmart
105004710112170404IPhone X 256 GB Space Gray/Local1Union Courier
11112170404IPhone X 256 GB Space Gray/Local1Union Courier
12
Sheet3
 
Upvote 0
dear peter im so glad to meet you here really u make everything going easier for me :) i appreciate that so im really sorry for my many requests im asking you to make this lastest updated for J2 to be not repeated as well just only the product qty per each order :) many thanks again
 
Upvote 0
.. updated for J2 to be not repeated as well just only the product qty per each order
For the layout in post 23, try this in J2, copied down.
If it is not what you meant, please provide the expected results for each cell in J2:J11 for that sample data.

=IF(G2="","",VLOOKUP(G2,A$2:D$6,4,0))
 
Upvote 0
For the layout in post 23, try this in J2, copied down.
If it is not what you meant, please provide the expected results for each cell in J2:J11 for that sample data.

=IF(G2="","",VLOOKUP(G2,A$2:D$6,4,0))

its worked very well peter you're a brilliant man :) i really appreciate that support
 
Upvote 0
i have some problems after all formulas inside ..
Please specify the problems you are having and where they are located. I'm afraid I don't intend to examine 28,000+ cells (which are in a different layout to what I had been dealing with) to try and guess what your problems are. ;)
 
Upvote 0
what i saw till now if you check the last order number 85644 at results and compare it with data in the next tab you'll find the first it item has been repeated 4 times (Order number,SKU,Description) and the delivery method maybe because of VLOOKUP function so can you find the way out to fix that ? thanks alot peter :)
 
Upvote 0
Neither your previous sample data nor any description you gave in the last week mentioned that the same order number could be repeated on more than one line of the original data.:(
 
Upvote 0

Forum statistics

Threads
1,223,236
Messages
6,170,915
Members
452,366
Latest member
TePunaBloke

We've detected that you are using an adblocker.

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.
Go back
Back
Top