?
Solved

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

Posted on 2011-03-23
7
Medium Priority
?
435 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
  • 2
7 Comments
 
LVL 7

Assisted Solution

by:Jignesh Thar
Jignesh Thar earned 1000 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 1000 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
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

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

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Some code to ensure data integrity when using macros within Excel. Also included code that helps secure your data within an Excel workbook.
Access developers frequently have requirements to interact with Excel (import from or output to) in their applications.  You might be able to accomplish this with the TransferSpreadsheet and OutputTo methods, but in this series of articles I will di…
Graphs within dashboards are meant to be dynamic, representing data from a period of time that will change each time the dashboard is updated with new data. Rather than update each graph to point to a different set within a static set of data, t…
This Micro Tutorial demonstrate the bugs in Microsoft Excel for Mac with Pivot Charts.

752 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