Is there a way to do a vlookup with two separate criteria?
Is there a way to do a vlookup with two separate criteria?
Last edited by mkvassh; 10-22-2009 at 07:56 AM.
It can be made. Post an example
Never use Merged Cells in Excel
I have the following content in column A, B and C
I want to lookup the content of column C if there is match with the content in A and B combined. Lookup values for A and B will be in Z1 and Z2. An array function is OK.Cost element Cost object Area
709015 WTK.RND.0360.EN.EX Other
972236 WTK.RND.0360.EN.EX Drilling & Production
972261 WTK.RND.0360.EN.EX Drilling & Production
979455 WTK.RND.0360.EN.EX Upstream Technology
709015 WTK.RND.0360.EN.PR Other
972237 WTK.RND.0360.EN.PR Drilling & Production
972260 WTK.RND.0360.EN.PR Drilling & Production
977745 WTK.RND.0360.EN.PR Project Development
979456 WTK.RND.0360.EN.PR Upstream Technology
979508 WTK.RND.0360.EN.PR Other
709015 WTK.RND.0371.EN.EX Credit
709015 WTK.RND.0371.EN.PR Credit
Last edited by mkvassh; 10-22-2009 at 07:44 AM.
Try
=Index($C$1:$C$100,Match(1,Index(($A$1:$A$100=Z1)*($B$1:$B$100=Z2),0),0))
adjust ranges to suit
Where there is a will there are many ways.
If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below left corner
Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.
It works. Is it not possible to do this with a Vlookup-function?
It is, but you would need to have a helper column inbetween, which concatenates columns A and B, and then you can use something like
=Vlookup(Z1&Z2,$C$1:$D$100,2,0)
where column C contains concatenated columns A&B and Column D is the column to index.
Thank you :-)
I found a Vlookup array function on Internet. It will work as well
Press CTRL-SHIFT-ENTER together to enter this.=VLOOKUP(E1,IF($B$1:$B$2=F1,$A1:$C$2,""),3,FALSE)
Click here if you want to check the place I found this. I haven't adjusted the function to fit the problem above.
Last edited by mkvassh; 10-22-2009 at 08:24 AM.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks