Vlookup with 2 criteria

emshep005

New Member
Joined
Nov 29, 2018
Messages
5
I need help with a formula to look in a chart & (1) identify brand, (2) determine if a date is between to dates, and (3) return a value of a corresponding event. Here is a snapshot of the data:

[TABLE="width: 396"]
<tbody>[TR]
[TD="class: xl66, width: 101"]Brand (Col. A)[/TD]
[TD="class: xl66, width: 224"]Event (Col. B)[/TD]
[TD="class: xl67, width: 101"]start (Col. C)[/TD]
[TD="class: xl67, width: 101"]end (Col. D)[/TD]
[/TR]
[TR]
[TD]Brand A[/TD]
[TD="class: xl65"]Winter Clearance[/TD]
[TD="class: xl68, align: right"]1/1/2017[/TD]
[TD="class: xl68, align: right"]2/7/2017[/TD]
[/TR]
[TR]
[TD]Brand A[/TD]
[TD="class: xl65"]Athletic[/TD]
[TD="class: xl68, align: right"]2/8/2017[/TD]
[TD="class: xl68, align: right"]3/28/2017[/TD]
[/TR]
[TR]
[TD="class: xl69"]Brand B[/TD]
[TD="class: xl65"]Spring[/TD]
[TD="class: xl68, align: right"]3/29/2017[/TD]
[TD="class: xl68, align: right"]5/23/2017[/TD]
[/TR]
[TR]
[TD="class: xl69"]Brand B[/TD]
[TD="class: xl65"]Summer[/TD]
[TD="class: xl68, align: right"]5/24/2017[/TD]
[TD="class: xl68, align: right"]6/20/2017[/TD]
[/TR]
[TR]
[TD]Brand A[/TD]
[TD="class: xl65"]Summer Clearance[/TD]
[TD="class: xl68, align: right"]6/6/2018[/TD]
[TD="class: xl68, align: right"]7/10/2018[/TD]
[/TR]
[TR]
[TD]Brand A[/TD]
[TD="class: xl65"]Black Friday[/TD]
[TD="class: xl68, align: right"]11/14/2018[/TD]
[TD="class: xl68, align: right"]11/27/2018[/TD]
[/TR]
[TR]
[TD]Brand A[/TD]
[TD="class: xl65"]Holiday[/TD]
[TD="class: xl68, align: right"]11/28/2018[/TD]
[TD="class: xl68, align: right"]1/1/2019[/TD]
[/TR]
[TR]
[TD="class: xl69"]Brand B[/TD]
[TD="class: xl65"]Spring[/TD]
[TD="class: xl70, align: right"]3/14/2018[/TD]
[TD="class: xl70, align: right"]5/8/2018[/TD]
[/TR]
[TR]
[TD="class: xl69"]Brand B[/TD]
[TD="class: xl65"]Summer[/TD]
[TD="class: xl70, align: right"]5/9/2018[/TD]
[TD="class: xl70, align: right"]6/19/2018[/TD]
[/TR]
</tbody>[/TABLE]


Here is what I'm looking for:

[TABLE="width: 228"]
<tbody>[TR]
[TD="class: xl65, width: 101"]Brand[/TD]
[TD="class: xl65, width: 101"]Actual Date[/TD]
[TD="class: xl65, width: 101"]Event[/TD]
[/TR]
[TR]
[TD="class: xl65"]Brand A[/TD]
[TD="class: xl66"]3/15/2017[/TD]
[TD="class: xl67"]?[/TD]
[/TR]
[TR]
[TD="class: xl65"]Brand B[/TD]
[TD="class: xl66"]5/18/2018[/TD]
[TD="class: xl67"]?[/TD]
[/TR]
</tbody>[/TABLE]


So this first one for Brand A 3/15/17 should return event: Athletic
Brand B 5/18/18 should return event: Summer



Thank you!!!
 

Excel Facts

Square and cube roots
The =SQRT(25) is a square root. For a cube root, use =125^(1/3). For a fourth root, use =625^(1/4).
Re: Need help with Vlookup with 2 criteria


Book1
ABCD
1BrandEventstartend
2Brand AWinter Clearance01/01/201707/02/2017
3Brand AAthletic08/02/20173/28/2017
4Brand BSpring3/29/20175/23/2017
5Brand BSummer5/24/20176/20/2017
6Brand ASummer Clearance06/06/201810/07/2018
7Brand ABlack Friday11/14/201811/27/2018
8Brand AHoliday11/28/201801/01/2019
9Brand BSpring3/14/201808/05/2018
10Brand BSummer09/05/20186/19/2018
11
12BrandActual DateEvent
13Brand A3/15/2017Athletic
14Brand B5/18/2018Summer
Test
Cell Formulas
RangeFormula
C13{=INDEX($B$2:$B$10,MATCH(B13,IF($C$2:$C$10<=B13,IF($A$2:$A$10=A13,IF($D$2:$D$10>=B13,$D$2:$D$10))),-1))}
C14{=INDEX($B$2:$B$10,MATCH(B14,IF($C$2:$C$10<=B14,IF($A$2:$A$10=A14,IF($D$2:$D$10>=B14,$D$2:$D$10))),-1))}
Press CTRL+SHIFT+ENTER to enter array formulas.
 
Last edited:
Upvote 0
Re: Need help with Vlookup with 2 criteria

Sorry, posted twice.
 
Last edited:
Upvote 0

Forum statistics

Threads
1,223,885
Messages
6,175,187
Members
452,616
Latest member
intern444

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