Solved

Vlookup based on 2 parameters? or another way to do this (index?)

Posted on 2011-03-23
7
406 Views
Last Modified: 2012-06-22
Not sure how to do this. I don't think I can use vlookup for 2 parameters.

I want to look up a value in my dates worksheet based off of I2 and I6 on my OFD12 worksheet.

Example: If my  pay start date in OFD12!I2 is 3-6-11 and I am assigned to the C shift in OFD12!I6, then I want to return the value of 103  (dates!G7) in the OFD12!K3).

I have read about index, but still don't get that.

Thanks for any help
Brent expert-question-woc-total-hours.xls
0
Comment
Question by:bvanscoy678
  • 3
  • 2
  • 2
7 Comments
 
LVL 7

Assisted Solution

by:Jignesh Thar
Jignesh Thar earned 250 total points
ID: 35198021
you can use combination of Index and Match. Use below

=INDEX(dates!A:G,MATCH(I2,dates!A:A,0),MATCH(I6,dates!1:1,0))
0
 
LVL 7

Expert Comment

by:Jignesh Thar
ID: 35198029
To explain what it does
I'm looking up row number for maching I2 using MATCH(I2,dates!A:A,0) and column number for matching I6 using MATCH(I6,dates!1:1,0)).

Finally am reaching 103 using row and col number as looked up above.
0
 
LVL 50

Accepted Solution

by:
barry houdini earned 250 total points
ID: 35198036
Hello Brent,

Try this formula in K3

=INDEX(dates!E2:G27,MATCH(I2,dates!A2:A27),MATCH(I6,dates!E1:G1,0))

format as general, see attached

regards, barry
26905844.xlsx
0
Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

 

Author Comment

by:bvanscoy678
ID: 35198409
I tried both ways, for some reason I get a n/A returned.

I am using 2003 if that makes a difference.

thanks
pivot-ofd-12-VERSION-3.xls
0
 
LVL 50

Expert Comment

by:barry houdini
ID: 35198472
In that version you have changed the headers in dates!E1:G1 to show "a shift" etc. so that doesn't match with just "a" in I6 - if you change I6 to "a shift" (without quotes) then that should work - format K3 as general (otherwise you'll see a date format)

regards, barry
0
 

Author Comment

by:bvanscoy678
ID: 35198512
Yes, I see that now.

thanks for both of the formulas. I will make the header changes and place the formula back in.

Off to solve more issues, I don't know about! Thanks
0
 

Author Closing Comment

by:bvanscoy678
ID: 35198525
thanks for both of the formulas.
0

Featured Post

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This code takes an Excel list of URL’s and adds a header titled “URL List”. It then searches through all URL’s in column “A”, looking for duplicates. When a duplicate is found, it is moved to the top of the list. The duplicate URL’s are then highlig…
Do you use a spreadsheet like Microsoft's Excel?  Have you ever wanted to link out to a non excel file on your computer or network drive?  This is the way I found to do it!
The viewer will learn how to use a discrete random variable to simulate the return on an investment over a period of years, create a Monte Carlo simulation using the discrete random variable, and create a graph to represent the possible returns over…
This Micro Tutorial will demonstrate how to create pivot charts out of a data set. I also added a drop-down menu which allows to choose from different categories in the data set and the chart will automatically update.

776 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question