I have columns by SKU product and supplier but the problem with vlookup is that it returns the first finding. So I have multiple product lines that may be the same but with different skus and suppliers.
I have columns by SKU product and supplier but the problem with vlookup is that it returns the first finding. So I have multiple product lines that may be the same but with different skus and suppliers.
Maybe try looking into advanced filter as substitution for vlookup
http://www.contextures.com/xladvfilter02.html
Another option would be to used the INDEX/SMALL/IF array, but to show how that works, you would need to upload a small (clean) sample workbook (not a pic) of what you are working with, and what your expected outcome would look like.
1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
2. If your question is resolved, mark it SOLVED using the thread tools
3. Click on the star if you think someone helped you
Regards
Ford
Maybe this...
Data Range
A B C D E F G 1 Product SKU Supplier Product SKU Supplier 2 A 11 1 C 44 2 3 A 22 1 55 3 4 B 33 2 66 3 5 C 44 2 6 C 55 3 7 C 66 3 8 D 77 4 9 D 88 5 10 D 99 6 11 ------ ------ ------ ------ ------ ------ ------
This array formula** entered in F2:
=IFERROR(INDEX(B:B,SMALL(IF($A$2:$A$10=$E$2,ROW($A$2:$A$10)),ROWS(F$2:F2))),"")
** array formulas need to be entered using the key
combination of CTRL,SHIFT,ENTER (not just ENTER).
Hold down both the CTRL key and the SHIFT key
then hit ENTER.
Copy across to G2 then down until you get blanks.
Biff
Microsoft MVP Excel
Keep It Simple Stupid
Let's Go Pens. We Want The Cup.
Sample workbook.xlsx
This is what is happening and what I need.
Thanks for all of the advice everyone! I'm learning a lot from these forums and slowly becoming more efficient at excel.
Is this what you require?
Still not real clear.
Based on the expected result as posted in your sample file, it looks like you want the last (bottom-most) instance of the lookup value (at least, that's how I interpret it!).
Data Range
A B C D E F G 1 ID Thing Thing 2 ------ ID (From different data) Thing (from DD) Thing 2 123456 Boston Nuttyville 123456 Africa Uniport 3 543212 abc vga 4 123432 xyz qwerty 5 123456 Africa Uniport
This formula entered in F2 and copied across to G2:
=LOOKUP(2,1/($A2:$A5=$E2),B2:B5)
Last edited by Tony Valko; 06-26-2015 at 06:06 PM. Reason: I don't know how to spell!
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks