Good Morning,
I have an issue that came up this morning during testing.
Here is the setup:
I have Auditors copy an order number to the orders worksheet. Then they would goto the UPC Scan sheets to start scanning UPC into col A. I have a Vlookup formula in col B that looks up the UPC that was scanned in Col A However it appears that our company has some items that have the same UPC for two items.
I have included a workbook to help with the issue. In the example in the workbook I have only one item listed Item 16781 on the order page. However when I scan the UPC on the UPC scan page it returns item 16780. So it reports an error,
I guess I need a way to use vlookup to look up the UPC that was scanned and if the item returned is not a match to what the item is on the order sheet then find the next item linked to that UPC?
It sounds a bit confusing but hopefully you can see what I mean when you look at the workbook.
Thanks for any help with the project.
Mike
Last edited by realniceguy5000; 08-25-2011 at 02:18 PM.
Is there any way we can add a "hidden helper column" to the Order sheet, that looks for the matching UPC in the UPC Verification sheet for the Item entered, then when you scan in the UPC SCANS sheet, it uses the Order sheet to lookup the item? Otherwise, not an easy task, especially if both items that could match were entered into the order.
Microsoft MVP - Excel
Where there is a will there are many ways. Pick One!
Please read the Forum Rules
If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below
Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.
Preferred Charities: Lupus Canada and Sick Kids Foundation.
Feel Free to Donate if you want to, for the assistance you received today.
I suppose we can add a helper col in. Is it possible for it to be past col K? If it has to come before, I would just have to make some modifations in some other workbooks that will use this data. However still possible.
As far as both items being on the same order, I'm told by sales that this could never happen.
But anyway how to proceed?
Thanks again for looking...
Mike
Okay maybe we can try this first without the helper column, since you say Sales assures you multiple items that can match the UPC won't occur.
Try, in B2 of UPC SCANS sheet:
confirmed with CTRL+SHIFT+ENTER not just ENTER.=IF(ISNUMBER(MATCH(A2,'UPC Verification'!$A$2:$A$99,0)),INDEX('UPC Verification'!$B$2:$B$99,MIN(IF(ISNUMBER(MATCH('UPC Verification'!$B$2:$B$99&'UPC Verification'!$A$2:$A$99,Order!$A$6:$A$30&A2,0)),ROW('UPC Verification'!$A$2:$A$99)-ROW('UPC Verification'!$A$2)+1))),"")
Note: adjust ranges to suit, or make dynamic range(s). I have allowed for upto 30 order lines and up to row 99 of the UPC verifications.
Microsoft MVP - Excel
Where there is a will there are many ways. Pick One!
Please read the Forum Rules
If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below
Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.
Preferred Charities: Lupus Canada and Sick Kids Foundation.
Feel Free to Donate if you want to, for the assistance you received today.
Thank You, That Formula seems to work.
I will keep testing.
I know this isn't the VBA forum, but would you know how to enter that formula through VBA.
Thanks Once Again For your help.
Mike
I am not a VBA guy... but I think it's something like:
but when I test in immediate window it gives runtime error 1004: unable to set the formulaArray property of the Range classSheets(1).Range("B2:B100").FormulaArray = "=IF(ISNUMBER(MATCH(A2,'UPC Verification'!$A$2:$A$99,0)),INDEX('UPC Verification'!$B$2:$B$99,MIN(IF(ISNUMBER(MATCH('UPC Verification'!$B$2:$B$99&'UPC Verification'!$A$2:$A$99,Order!$A$6:$A$30&A2,0)),ROW('UPC Verification'!$A$2:$A$99)-ROW('UPC Verification'!$A$2)+1))),"""")"and I don't know why because it works using .Formula
Microsoft MVP - Excel
Where there is a will there are many ways. Pick One!
Please read the Forum Rules
If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below
Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.
Preferred Charities: Lupus Canada and Sick Kids Foundation.
Feel Free to Donate if you want to, for the assistance you received today.
Ok Same thing happened to me, Let me post this question for the guys over in the vba department.
However Thanks again so much for your help.
One last question...(yeah right your saying about now)
Do you think this formula is going to slow the worksheet up? The reason I ask is because the previous formula was not noticeable. And the real UPC list can be over 8000 rows long. I'm trying to make it as fast as possible with out lag time between scans.
Anyway Thank You, Mike
Thank You, Mike
Some Helpful Hints:
1. New members please read & follow the Forum Rules
2. Use Code Tags...Place[code]Before the first line and[/code] After the last line.
3. If you are pleased with a solution mark your post SOLVED.
4. Thank those who have help you by clicking the scales at the top right of the post.
Here...
With 8000 UPC it shouldn't be too bad, especially if your Order list is small too... but using the helper column I mentioned would significantly increase efficiency and speed.
Microsoft MVP - Excel
Where there is a will there are many ways. Pick One!
Please read the Forum Rules
If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below
Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.
Preferred Charities: Lupus Canada and Sick Kids Foundation.
Feel Free to Donate if you want to, for the assistance you received today.
Ok, I played around a little with the helper column but wasnt very succesful. I kept getting an NA Error.
This is a growing project so after I get this up and running correctly I may revisit the idea.Next year we are changing our order process so people will be able to order less than case qty. meaning I will have to add all the inner and each UPC into the mix.
Thanks, Mike
Thank You, Mike
Some Helpful Hints:
1. New members please read & follow the Forum Rules
2. Use Code Tags...Place[code]Before the first line and[/code] After the last line.
3. If you are pleased with a solution mark your post SOLVED.
4. Thank those who have help you by clicking the scales at the top right of the post.
Here...
In case anyone has an issue like this here is the post that solves how to enter this using VBA.
Many Many Thanks To All...
http://www.excelforum.com/excel-prog...ml#post2587136
Mike
Thanks for posting the link Mike.
Microsoft MVP - Excel
Where there is a will there are many ways. Pick One!
Please read the Forum Rules
If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below
Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.
Preferred Charities: Lupus Canada and Sick Kids Foundation.
Feel Free to Donate if you want to, for the assistance you received today.
From PM
Try:Hi,
If you get time, The formula you gave me in this post. Has one issue I was hoping you could see what might be wrong.
http://www.excelforum.com/excel-work...ml#post2587281
Post # 4
if you open the workbook I provided you should see the problem I am having if you do the following:
1st copy your formula to upc scans B2 and drag down to B9 or so.
2nd Enter this item number (5) in A6 of the orders page.
3rd goto the upc verifcation sheet and copy any item numbers upc and paste the value into the upc scan page.
You should see in B2 of the UPC Scan sheet item number 15606 show up but it is the wrong Item for that UPC? I also tried to type the number in and the same thing happend.
Anyway it appears that any upc you type in comes up with item 15606
Do you know how to fix?
=IF(ISNUMBER(MATCH(A2,'UPC Verification'!$A$2:$A$99,0)),IF(SUMPRODUCT(COUNTIF(Order!$A$6:$A$30,'UPC Verification'!$B$2:$B$99)),INDEX('UPC Verification'!$B$2:$B$99,MIN(IF(ISNUMBER(MATCH('UPC Verification'!$B$2:$B$99&'UPC Verification'!$A$2:$A$99,Order!$A$6:$A$30&A2,0)),ROW('UPC Verification'!$A$2:$A$99)-ROW('UPC Verification'!$A$2)+1))),""),"")
Microsoft MVP - Excel
Where there is a will there are many ways. Pick One!
Please read the Forum Rules
If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below
Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.
Preferred Charities: Lupus Canada and Sick Kids Foundation.
Feel Free to Donate if you want to, for the assistance you received today.
No, that didn't work either. it finds the correct item if the upc is correct but it always returns the first item from the upc verifcation sheet that is in cell B2.
Like I said it's no rush I wont be testing live data again untill monday.
Let me know what your thinking, Maybe we should move towards the helper col idea?
Unless you see whats may be going on with the formula.
Thanks for taking the time to help...
Mike
Before we go to the helper route, try this one... it's turning into a mega formula, but I think it works.
=IF(A2="","",IF(ISNUMBER(MATCH(A2,'UPC Verification'!$A$2:$A$99,0)),IF(MIN(IF(ISNUMBER(MATCH('UPC Verification'!$B$2:$B$99&'UPC Verification'!$A$2:$A$99,Order!$A$6:$A$30&A2,0)),ROW('UPC Verification'!$A$2:$A$99)-ROW('UPC Verification'!$A$2)+1))=0,"Not Ordered",INDEX('UPC Verification'!$B$2:$B$99,MIN(IF(ISNUMBER(MATCH('UPC Verification'!$B$2:$B$99&'UPC Verification'!$A$2:$A$99,Order!$A$6:$A$30&A2,0)),ROW('UPC Verification'!$A$2:$A$99)-ROW('UPC Verification'!$A$2)+1))))))
Microsoft MVP - Excel
Where there is a will there are many ways. Pick One!
Please read the Forum Rules
If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below
Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.
Preferred Charities: Lupus Canada and Sick Kids Foundation.
Feel Free to Donate if you want to, for the assistance you received today.
Hi, That is some formula...
Thanks for looking and working on your weekend time...
I have only been able to test with my sample file,however it appears to work with the changes you made.
However I see you added "not ordered", Can that be changed to show the item number? Or is that the way it has to be ?
Let me know, Thanks again.
Mike
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks