Index / Match Return Multiple Strings between Two Dates

artikyulashun

New Member
Joined
Aug 21, 2012
Messages
41
I have a three columns for 2018 Holidays :


SubjectStart DateEnd Date
Weight Loss Awareness Month1/1/20181/31/2018
National Blood Donor Month1/1/20181/31/2018
National Hobby Month1/1/20181/31/2018
Golden Globes1/7/20181/7/2018
Girl Scout Cookie Season Begins1/1/20181/31/2018
Diet Resolution Week1/1/20181/7/2018
Hunt For Happiness1/4/20181/20/2018
New Year's Day1/1/20181/1/2018
Trivia Day1/4/20181/4/2018

<tbody>
</tbody>




I'm trying to use the following formula to return a list of "active" Holidays between two dates.


=IFERROR(INDEX(Holidays,MATCH(1,(start_dates>=T$5)*(end_dates<=X$5),0)),"")


The start date in this example would be 12/27/2018 and the end date would be 1/3/2018.


Appreciate your consideration.
 

Excel Facts

Move date out one month or year
Use =EDATE(A2,1) for one month later. Use EDATE(A2,12) for one year later.
Considering your data sample above is the expect result just New Year's Day?

M.
 
Upvote 0
The List should include everything listed except for the "Golden Globes" and "Hunt for Happiness" which start after 1/3/2018.

Anything that has started, but not ended should appear in the list.
 
Upvote 0
The limitation of the formula I started with is that it only pulls holidays that start and end between the two dates entered.
 
Upvote 0
The List should include everything listed except for the "Golden Globes" and "Hunt for Happiness" which start after 1/3/2018.

Anything that has started, but not ended should appear in the list.

Suppose a holiday that starts at 01/01/2018 and ends at 02/01/2018: should also it be included?

M.
 
Upvote 0
Maybe something like this

A
B
C
D
E
F
G
1
Subject​
Start Date​
End Date​
Start​
End​
List​
2
Weight Loss Awareness Month​
01/01/2018​
01/31/2018​
12/27/2017​
01/03/2018​
Weight Loss Awareness Month​
3
National Blood Donor Month​
01/01/2018​
01/31/2018​
National Blood Donor Month​
4
National Hobby Month​
01/01/2018​
01/31/2018​
National Hobby Month​
5
Golden Globes​
01/07/2018​
01/07/2018​
Girl Scout Cookie Season Begins​
6
Girl Scout Cookie Season Begins​
01/01/2018​
01/31/2018​
Diet Resolution Week​
7
Diet Resolution Week​
01/01/2018​
01/07/2018​
New Year's Day​
8
Hunt For Happiness​
01/04/2018​
01/20/2018​
9
New Year's Day​
01/01/2018​
01/01/2018​
10
Trivia Day​
01/04/2018​
01/04/2018​

Array formula in G2 copied down
=IFERROR(INDEX(A$2:A$10,SMALL(IF(B$2:B$10>=E$2,IF(B$2:B$10<=F$2,ROW(A$2:A$10)-ROW(A$2)+1)),ROWS(G$2:G2))),"")
Ctrl+Shift+Enter

M.
 
Upvote 0
Works beautifully. Thank you.

However, I'm curious why "Weight Loss Awareness Month" drops when I change the start date to 1/4/2018 and the end date to 1/11/2018. It's still "active" during this time frame.
 
Upvote 0

Forum statistics

Threads
1,216,180
Messages
6,129,340
Members
449,505
Latest member
Alan the procrastinator

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