Solved

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

Posted on 2011-03-23
7
387 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
What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

 

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

What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

A2 = A1 That kind of cell reference is relative.  If you copy it from A2 to B2, then B2 will get this: B2 = B1 That's all fine and good, but if you then insert a new row above row 2, you'll find: A3 = A1 B3 = B1 This is intentional. …
Drop Down List with Unique/Distinct Values (enhancing the Combo-Box with a few steps and a little code) David miller (dlmille) Intro Have you ever created a data validation list from a database field or spreadsheet column (e.g., Zip Codes or Co…
This Micro Tutorial will demonstrate how to use a scrolling table in Microsoft Excel using the INDEX function.
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.

706 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

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now