Hello guys,
Sorry to necro a thread but I'm having some real trouble with a vlookup duplicates. I'm very bad at Excel and I've been lumbered with something that is beyond my knowledge - hoping you can help.
I guess it is easiest to explain in full to avert any confusion...
I have three sheets right now:
Stock to pick
Data input
Data output
On "Stock to pick", we have two columns: "Stock" and "Quantity to pick"
On "Data input", we have "Stock", "Quantity" and "Location"
On "Data output", we have "Location", Stock, "Quantity in location" and "Quantity to pick".
My current formulas on "Data output" are as followed:
Location: =VLOOKUP('Stock To Pick'!A4,'Data Input'!A:C,3,FALSE)
Stock: =VLOOKUP('Stock To Pick'!A4,'Data Input'!A:C,1,FALSE)
Quantity in location: =VLOOKUP('Stock To Pick'!A4,'Data Input'!A:C,2,FALSE)
Quantity to pick: =VLOOKUP(B2,'Stock To Pick'!A:B,2,FALSE)
My problem arises because each unit of Stock in a varied location is listed individually, i.e.:
(Data input)
[TABLE="width: 500, align: left"]
<tbody>[TR]
[TD]Stock
[/TD]
[TD]Quantity
[/TD]
[TD]Location[/TD]
[/TR]
[TR]
[TD]A[/TD]
[TD]1[/TD]
[TD]London[/TD]
[/TR]
[TR]
[TD]A[/TD]
[TD]1[/TD]
[TD]Manchester[/TD]
[/TR]
[TR]
[TD]A[/TD]
[TD]1[/TD]
[TD]Hamburg[/TD]
[/TR]
[TR]
[TD]B[/TD]
[TD]1[/TD]
[TD]London[/TD]
[/TR]
[TR]
[TD]B[/TD]
[TD]1[/TD]
[TD]Manchester[/TD]
[/TR]
[TR]
[TD]B[/TD]
[TD]1[/TD]
[TD]Paris[/TD]
[/TR]
[TR]
[TD]C[/TD]
[TD]1[/TD]
[TD]Paris[/TD]
[/TR]
[TR]
[TD]C[/TD]
[TD]1[/TD]
[TD]Manchester[/TD]
[/TR]
[TR]
[TD]D[/TD]
[TD]1[/TD]
[TD]London[/TD]
[/TR]
[TR]
[TD]E[/TD]
[TD]1[/TD]
[TD]London[/TD]
[/TR]
</tbody>[/TABLE]
Of course, on my "Data output" sheet, the "Quantity to pick" field is a numeric value as opposed to having multiple lines of the same item of stock with a value of one (unlike the "Data input" sheet, which is multiple lines of quantity "1").
Right now, my Vlookup on "Data output" is giving me the first return of stock from the "Data input" sheet, where I may need two or three units of stock from two or three locations and I have no idea how to amend the formula to show multiple results without duplication!
I hope this is clear and any help would be greatly appreciated.
Many thanks,
MrBadAtExcel