Help please with vlookup or index match

mina91709

New Member
Joined
Mar 25, 2017
Messages
25
I AM TRYING TO USE VLOOK UP OR ANY OTHER FORMULA THAT WOULD WORK WITH MY APPROACH.

FORMULA WILL LOOK UP THE DATE FROM MULTIPLE TABLES AND POPULATE 1ST AND 2ND VALUES FOR THE CATEGORiES BASED THE DATE VALIDATION NOTE IT WILL GO TO THE NEXT VALID DATE SEE EXAMPLE BELOW I AM SORRY IF I AM NOT CLEAR BUT WHAT I AM TRYING TO DO IS INPUT THE DATE IN THE DATE INPUT AND IT WILL SEARCH THE TABLES BELOW TO POPULATE 1ST VALUE AND 2ND VALUE. FROM THE EXAMPLE BELOW I PUT IT 7/15/2008 SO IT LOOKED UP THE TABLES AT THE BOTTOM AND PICKED UP THE VALUES VALID FOR THAT DATE SO IT PICKUP THE VALUES FOR 12/31/2008
THANK YOU IN ADVANCE

[TABLE="class: cms_table, width: 500"]
<tbody>[TR]
[TD]CATEGORY[/TD]
[TD]1ST VALUE[/TD]
[TD]2ND VALUE[/TD]
[TD]DATE INPUT[/TD]
[/TR]
[TR]
[TD]A[/TD]
[TD]10[/TD]
[TD]10[/TD]
[TD]7/15/2008[/TD]
[/TR]
[TR]
[TD]B[/TD]
[TD]20[/TD]
[TD]20[/TD]
[TD]7/15/2008[/TD]
[/TR]
[TR]
[TD]C[/TD]
[TD]30[/TD]
[TD]30[/TD]
[TD]7/15/2008[/TD]
[/TR]
[TR]
[TD]D[/TD]
[TD]40[/TD]
[TD]40[/TD]
[TD]7/15/2008[/TD]
[/TR]
[TR]
[TD]E[/TD]
[TD]50[/TD]
[TD]50[/TD]
[TD]7/15/2008[/TD]
[/TR]
</tbody>[/TABLE]


GIVEN TABLES/LOOKUP TABLE
[TABLE="class: cms_table, width: 500"]
<tbody>[TR]
[TD]CATEGORY[/TD]
[TD][/TD]
[TD]1ST VALUE[/TD]
[TD]2ND VALUE[/TD]
[TD]VALID TO DATE[/TD]
[TD][/TD]
[TD]1ST VALUE[/TD]
[TD]2ND VALUE[/TD]
[TD]VALID TO DATE[/TD]
[TD][/TD]
[TD]1ST VALUE[/TD]
[TD]2ND VALUE[/TD]
[TD]DATE[/TD]
[/TR]
[TR]
[TD]A[/TD]
[TD][/TD]
[TD]15[/TD]
[TD]20[/TD]
[TD]6/30/2008[/TD]
[TD][/TD]
[TD]10[/TD]
[TD]10[/TD]
[TD]12/31/2008[/TD]
[TD][/TD]
[TD]30[/TD]
[TD]80[/TD]
[TD]6/30/2009[/TD]
[/TR]
[TR]
[TD]B[/TD]
[TD][/TD]
[TD]60[/TD]
[TD]5[/TD]
[TD]6/30/2008[/TD]
[TD][/TD]
[TD]20[/TD]
[TD]20[/TD]
[TD]12/31/2008[/TD]
[TD][/TD]
[TD]100[/TD]
[TD]50[/TD]
[TD]6/30/2009[/TD]
[/TR]
[TR]
[TD]C[/TD]
[TD][/TD]
[TD]5[/TD]
[TD]8[/TD]
[TD]6/30/2008[/TD]
[TD][/TD]
[TD]30[/TD]
[TD]30[/TD]
[TD]12/31/2008[/TD]
[TD][/TD]
[TD]120[/TD]
[TD]80[/TD]
[TD]6/30/2009[/TD]
[/TR]
[TR]
[TD]D[/TD]
[TD][/TD]
[TD]7[/TD]
[TD]9[/TD]
[TD]6/30/2008[/TD]
[TD][/TD]
[TD]40[/TD]
[TD]40[/TD]
[TD]12/31/2008[/TD]
[TD][/TD]
[TD]50[/TD]
[TD]100[/TD]
[TD]6/30/2009[/TD]
[/TR]
[TR]
[TD]E[/TD]
[TD][/TD]
[TD]200[/TD]
[TD]8[/TD]
[TD]6/30/2008[/TD]
[TD][/TD]
[TD]50[/TD]
[TD]50[/TD]
[TD]12/31/2008[/TD]
[TD][/TD]
[TD]100[/TD]
[TD]50[/TD]
[TD]6/30/2009[/TD]
[/TR]
</tbody>[/TABLE]
 

Excel Facts

How to fill five years of quarters?
Type 1Q-2023 in a cell. Grab the fill handle and drag down or right. After 4Q-2023, Excel will jump to 1Q-2024. Dash can be any character.
Please take a moment to re-write your post in normal sentence case - the all capitals text is really hard to read. Then please explain how the two tables relate to each other - I can see no matching features.
 
Upvote 0
1) Turn your CAPS LOCK off.
2) Try

in Sheet 1!B2
=INDEX(Sheet2!A$2:M$5,MATCH(Sheet1!A2,Sheet2!A$2:A$6,0),IF(Sheet1!D$2<=Sheet2!E$2:E$6,C$2:C$6,IF(Sheet1!D$2<=I$2:I$6,G$2:G$6,K$2:K$6)))
Array formula, use Ctrl-Shift-Enter
and copy down the column

in Sheet 1!C2
=INDEX(Sheet2!A$2:M$5,MATCH(Sheet1!A2,Sheet2!A$2:A$6,0),IF(Sheet1!D$2<=Sheet2!E$2:E$6,D$2:D$6,IF(Sheet1!D$2<=I$2:I$6,H$2:H$6,L$2:L$6)))
Array formula, use Ctrl-Shift-Enter
and copy down the column
 
Upvote 0
1) Turn your CAPS LOCK off.
2) Try

in Sheet 1!B2
=INDEX(Sheet2!A$2:M$5,MATCH(Sheet1!A2,Sheet2!A$2:A$6,0),IF(Sheet1!D$2<=Sheet2!E$2:E$6,C$2:C$6,IF(Sheet1!D$2<=I$2:I$6,G$2:G$6,K$2:K$6)))
Array formula, use Ctrl-Shift-Enter
and copy down the column

in Sheet 1!C2
=INDEX(Sheet2!A$2:M$5,MATCH(Sheet1!A2,Sheet2!A$2:A$6,0),IF(Sheet1!D$2<=Sheet2!E$2:E$6,D$2:D$6,IF(Sheet1!D$2<=I$2:I$6,H$2:H$6,L$2:L$6)))
Array formula, use Ctrl-Shift-Enter
and copy down the column

Nice! I had to make a few changes to make this work for me.


Excel 2010
ABCDEFGHIJKLM
1CATEGORY1ST VALUE2ND VALUEVALID TO DATE1ST VALUE2ND VALUEVALID TO DATE1ST VALUE2ND VALUEDATE
2A15206/30/2008101012/31/200830806/30/2009
3B6056/30/2008202012/31/2008100506/30/2009
4C586/30/2008303012/31/2008120806/30/2009
5D796/30/2008404012/31/2008501006/30/2009
6E20086/30/2008505012/31/2008100506/30/2009
Sheet2



Excel 2010
ABCD
1CATEGORY1ST VALUE2ND VALUEDATE INPUT
2A10107/15/2008
3B20207/15/2008
4C30307/15/2008
5D40407/15/2008
6E50507/15/2008
Sheet1
Cell Formulas
RangeFormula
B2{=INDEX(Sheet2!A$2:M$6,MATCH(A2,Sheet2!A$2:A$6,0),IF(D$2<=Sheet2!E$2:E$6,3,IF(D$2<=Sheet2!I$2:I$6,7,11)))}
C2{=INDEX(Sheet2!A$2:M$6,MATCH(A2,Sheet2!A$2:A$6,0),IF(D$2<=Sheet2!E$2:E$6,4,IF(D$2<=Sheet2!I$2:I$6,8,12)))}
Press CTRL+SHIFT+ENTER to enter array formulas.
 
Upvote 0
thank you all for the help.
The tables are on the same sheet. Is there a formula that will work within the same sheet.

Thank you
 
Upvote 0
thank you all for the help.
The tables are on the same sheet. Is there a formula that will work within the same sheet.

Thank you

Same formulas just adjust the references and get rid of the "Sheet2!". I'm sure that you can figure that out looking at the layout in post #4.
 
Last edited:
Upvote 0
Same formulas just adjust the references and get rid of the "Sheet2!". I'm sure that you can figure that out looking at the layout in post #4.

Perhaps Six-Three, but they asked, so might as well answer. Never know what the other person may or may not have knowledge of; and it may educate someone else that stumbles upon this page one day. A lot of times, I find an answer somewhere, but the person answering is so knowledgeable that they forget to explain a lot of the "little" things that really make it all work. The more you know (enter star graphic here). :)

Here is the adjustment to Falcon's formulas:

{=INDEX(A$2:M$6,MATCH(A2,A$2:A$6,0),IF(D$2<=E$2:E$6,3,IF(D$2<=I$2:I$6,7,11)))}
{=INDEX(A$2:M$6,MATCH(A2,A$2:A$6,0),IF(D$2<=E$2:E$6,4,IF(D$2<=I$2:I$6,8,12)))}

And again...

Entered with Ctrl+Shift+Enter. If entered correctly, Excel will surround with curly braces {}.
Note: Do not try and enter the {} manually yourself
 
Upvote 0
Thank you everyone for your help. I will try it out and will let you know.


Perhaps Six-Three, but they asked, so might as well answer. Never know what the other person may or may not have knowledge of; and it may educate someone else that stumbles upon this page one day. A lot of times, I find an answer somewhere, but the person answering is so knowledgeable that they forget to explain a lot of the "little" things that really make it all work. The more you know (enter star graphic here). :)

Here is the adjustment to Falcon's formulas:

{=INDEX(A$2:M$6,MATCH(A2,A$2:A$6,0),IF(D$2<=E$2:E$6,3,IF(D$2<=I$2:I$6,7,11)))}
{=INDEX(A$2:M$6,MATCH(A2,A$2:A$6,0),IF(D$2<=E$2:E$6,4,IF(D$2<=I$2:I$6,8,12)))}

And again...

Entered with Ctrl+Shift+Enter. If entered correctly, Excel will surround with curly braces {}.
Note: Do not try and enter the {} manually yourself
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,170
Members
453,021
Latest member
Justyna P

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