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.
 
Not for me


A
B
C
D
E
F
G
1
Subject​
Start Date​
End Date​
Start​
End​
List​
2
Weight Loss Awareness Month​
01/04/2018
01/31/2018​
12/27/2017​
01/03/2018​
National Blood Donor Month​
3
National Blood Donor Month​
01/01/2018​
01/31/2018​
National Hobby Month​
4
National Hobby Month​
01/01/2018​
01/31/2018​
Girl Scout Cookie Season Begins​
5
Golden Globes​
01/07/2018​
01/07/2018​
Diet Resolution Week​
6
Girl Scout Cookie Season Begins​
01/01/2018​
01/31/2018​
New Year's Day​
7
Diet Resolution Week​
01/01/2018​
01/07/2018​
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​
11

<tbody>
</tbody>


Have you confirmed the formula with Ctrl+Shift+Enter, not just Enter?

M.
 
Last edited:
Upvote 0

Excel Facts

Repeat Last Command
Pressing F4 adds dollar signs when editing a formula. When not editing, F4 repeats last command.
Yes. Ctrl+Shift+Enter.

Apologies. I meant changing the start and end dates in Columns E and F.

Column B should still say 1/1/2018.
 
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.

hmm...i think i misunderstood what you are looking for

See if this does what you need

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​
01/04/2018​
01/11/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​
Golden Globes​
6
Girl Scout Cookie Season Begins​
01/01/2018​
01/31/2018​
Girl Scout Cookie Season Begins​
7
Diet Resolution Week​
01/01/2018​
01/07/2018​
Diet Resolution Week​
8
Hunt For Happiness​
01/04/2018​
01/20/2018​
Hunt For Happiness​
9
New Year's Day​
01/01/2018​
01/01/2018​
Trivia Day​
10
Trivia Day​
01/04/2018​
01/04/2018​

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

M.
 
Upvote 0

Forum statistics

Threads
1,216,775
Messages
6,132,658
Members
449,743
Latest member
rakeshsanger

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