Using a conditional vlookup

GillsMan

New Member
Joined
Apr 18, 2011
Messages
7
Hi all,

I've had a little search, but maybe my brain's a little frazzled and I'm not quite understanding how to put this into practice. My table is below. Essentially, I want to find the Session ID. Session IDs are linked to an Event ID.

vlookup.jpg


OK, so column C is where I need to input the data. I need the Session ID to be populated into column c using a vlookup or any formula really. Basically, what I want the vlookup to do is look at the value in column B, then look for that value in Column F. If it finds it, it should check to see if Column D and Column H are the same; if they are, it should pull in the value from column G, if not, it should carry on looking. Is this possible?

The table above is a simplified version of a spreadsheet I'm working on.

Example: So, the value that should go into cell C2 should be BCD-2. The value should go into cell C5 should be CDE-2. The value that should go into cell C8 should be ABC-3. Hopefully that helps explain what I'm trying to do here.

Thanks in advance for your help! Cheers.
 

Excel Facts

Does the VLOOKUP table have to be sorted?
No! when you are using an exact match, the VLOOKUP table can be in any order. Best-selling items at the top is actually the best.
so assuming that the completion date would always match the end date exactly you could try something like....

=IFERROR(INDEX($G$2:$G$100,MATCH(D2,IF(B2=$F$2:$F$100,$H$2:$H$100),0)),"") control shift enter

i'm not sure if there is a possibility in your data to have a completion date that doesn't necessarily match your end date
 
Upvote 0
Thanks Weazel. I actually found an easier way in the end:

I created a code which was a concatenation of the EventID and the Completion Date in the first set of data. Then I create a code which was a concatenation of the Event ID and the End Date in the second set of data. I then did a vlookup for the code, and pulled across the relevant Session ID. Worked perfectly!

Thanks for your help. :)
 
Upvote 0

Forum statistics

Threads
1,215,094
Messages
6,123,071
Members
449,092
Latest member
ipruravindra

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top