Array Formula to return list of birthdays falling between a start and end date

RicardoCubed

Board Regular
Joined
Jul 10, 2013
Messages
206
Office Version
  1. 365
Platform
  1. Windows
Help appreciated with adjusting the below formula to include returning all birthday between a start and end date. the below works for the intended purpose of determining who has a birthday on the month and day indicated. I want to have the added functionality of adding for example all those who have a birthday a start date and end date.
Thanks for any help out there.


Excel 2010
KLMN
383MonthDay
384NamesBirthday78
385Joe7/8/1965
386Harry5/7/1980
387Will Populate below range with who has birthday
388Joe
389George
390George7/8/1965Paul
391Rick6/8/1982--
392John3/1/1968--
393Paul7/8/1987--
394Ringo6/8/1990--
BDay
Cell Formulas
RangeFormula
M388{=IFERROR(INDEX($K$385:$K$394,SMALL(IF(ISNUMBER($L$385:$L$394),IF(MONTH($L$385:$L$394)=$M$384,IF(DAY($L$385:$L$394)=$N$384,ROW($L$385:$L$394)-ROW($L$385)+1))),ROWS($L$385:L385))),"--")}
Press CTRL+SHIFT+ENTER to enter array formulas.
 

Excel Facts

Will the fill handle fill 1, 2, 3?
Yes! Type 1 in a cell. Hold down Ctrl while you drag the fill handle.
Hi Aladin. to stick with the same data set say
start date = Month = 5 Day = 7
end date = Month = 6 Day = 8

so list would then have harry, rick and ringo.

Thanks!!!
 
Upvote 0
the ultimate would be to be able to enter any of the month day year criteria in either start and/or end dates and get the filtered list, see below for illustration.


Excel 2010
ABCDEF
2CriteriaMonthDayYear
3NamesBirthdayStart911954
4Joe7/8/1965End681982
5Harry5/7/1980
6Adam8/1/1982Will Populate below range with who has birthday
7Lauren9/1/1954Lauren
8Saul10/22/1960--
9George7/8/1965--
10Rick6/8/1982--
11John3/1/1968--
12Paul7/8/1987--
13Ringo6/8/1990--
Sheet1
Cell Formulas
RangeFormula
C7{=IFERROR(INDEX($A$4:$A$13,SMALL(IF(ISNUMBER($B$4:$B$13),IF(MONTH($B$4:$B$13)=$D$3,IF(DAY($B$4:$B$13)=$E$3,ROW($B$4:$B$13)-ROW($B$4)+1))),ROWS($B$4:B4))),"--")}
Press CTRL+SHIFT+ENTER to enter array formulas.
 
Upvote 0
Hi Aladin. to stick with the same data set say
start date = Month = 5 Day = 7
end date = Month = 6 Day = 8

so list would then have harry, rick and ringo.

Thanks!!!

Row\Col
K​
L​
M​
N​
382​
383​
MonthDay
384​
NamesBirthday
5
7
385​
Joe
7/8/1965
6
8
386​
Harry
5/7/1980
Count
3
387​
Anniversary Sublist
388​
Harry
5/7/1980
389​
Rick
6/8/1982
390​
George
7/8/1965
Ringo
6/8/1990
391​
Rick
6/8/1982
392​
John
3/1/1968
393​
Paul
7/8/1987
394​
Ringo
6/8/1990
395​

N386, control+shift+enter (cse), not just enter:
Rich (BB code):

=SUM(IF(ISNUMBER(L385:L394),IF(MONTH(L385:L394)>=M384,
    IF(DAY(L385:L394)>=N384,IF(MONTH(L385:L394)<=M385,
    IF(DAY(L385:L394)<=N385,1))))))

M388, cse and copy down:
Rich (BB code):

=IF(ROWS($M$388:M388)<=$N$386,INDEX($K$385:$K$394,
   SMALL(IF(ISNUMBER($L$385:$L$394),IF(MONTH($L$385:$L$394)>=$M$384,
   IF(DAY($L$385:$L$394)>=$N$384,IF(MONTH($L$385:$L$394)<=$M$385,
   IF(DAY($L$385:$L$394)<=$N$385,ROW($K$385:$K$394)-ROW($K$385)+1))))),
   ROWS($M$388:M388))),"")

N388, just enter and copy down:
Rich (BB code):

=IF($M388="","",VLOOKUP(M388,$K$385:$L$394,2,0))
 
Upvote 0
Aladin. Thank you. Just go back to this and works flawlessly!!!!
Appreciate it.
 
Upvote 0
Well - perhaps I messed it up because I was trying to query larger database and results wrong. I went back into the same, cut and pasted below. When I added Robin with date of 03-09-60 its not counting it or pulling in sublist. Yet when I added Tom it did. Suggestions???


Excel 2010
KLMN
383MonthDay
384NamesBirthday31
385Joe7/8/196568
386Harry5/7/1980Count6
387Aladin5/8/1970Anniversary Sublist
388Robin3/9/1960Harry5/7/1980
389tom3/4/1970Aladin5/8/1970
390George7/8/1965tom3/4/1970
391Rick6/8/1982Rick6/8/1982
392John3/1/1968John3/1/1968
393Paul7/8/1987Ringo6/8/1990
394Ringo6/8/1990
BDay
Cell Formulas
RangeFormula
N388=IF($M388="","",VLOOKUP(M388,K385:L394,2,0))
N386{=SUM(IF(ISNUMBER($L$385:$L$394),IF(MONTH($L$385:$L$394)>=M384,IF(DAY($L$385:$L$394)>=N384,IF(MONTH($L$385:$L$394)<=M385,IF(DAY($L$385:$L$394)<=N385,1))))))}
M388{=IF(ROWS($M$388:M388)<=$N$386,INDEX($K$385:$K$394,SMALL(IF(ISNUMBER($L$385:$L$394),IF(MONTH($L$385:$L$394)>=$M$384,IF(DAY($L$385:$L$394)>=$N$384,IF(MONTH($L$385:$L$394)<=$M$385,IF(DAY($L$385:$L$394)<=$N$385,ROW($K$385:$K$394)-ROW($K$385)+1))))),ROWS($M$388:M388))),"")}
Press CTRL+SHIFT+ENTER to enter array formulas.
 
Upvote 0
That Robin case is a good counterexample. Thanks for the test.

Row\Col
K​
L​
M​
N​
382​
2015​
383​
MonthDay
384​
NamesBirthday
3
1
385​
Joe
7/8/1965
6
8
386​
Harry
5/7/1980
Count
5
387​
Anniversary Sublist
388​
Harry
5/7/1980
389​
Rick
6/8/1982
390​
George
7/8/1965
Robin
3/9/1960
391​
Rick
6/8/1982
John
3/1/1968
392​
Robin
3/9/1960
Ringo
6/8/1990
393​
John
3/1/1968
394​
Paul
7/8/1987
395​
Ringo
6/8/1990
396​

M382, just enter:
Rich (BB code):

=YEAR(TODAY())

N386, control+shift+enter (cse), not just enter:
Rich (BB code):

=SUM(IF(ISNUMBER($L$385:$L$395),
    IF(DATE($M$382,MONTH($L$385:$L$395),DAY($L$385:$L$395))>=DATE($M$382,$M$384,$N$384),
    IF(DATE($M$382,MONTH($L$385:$L$395),DAY($L$385:$L$395))<=DATE($M$382,$M$385,$N$385),
    1))))

M388, cse and copy down:
Rich (BB code):

=IF(ROWS($M$388:M388)<=$N$386,INDEX($K$385:$K$395,
    SMALL(IF(ISNUMBER($L$385:$L$395),
    IF(DATE($M$382,MONTH($L$385:$L$395),DAY($L$385:$L$395))>=DATE($M$382,$M$384,$N$384),
    IF(DATE($M$382,MONTH($L$385:$L$395),DAY($L$385:$L$395))<=DATE($M$382,$M$385,$N$385),
    ROW($K$385:$K$395)-ROW($K$385)+1))),ROWS($M$388:M388))),"")

N388, just enter and copy down:
Rich (BB code):

=IF($M388="","",VLOOKUP(M388,$K$385:$L$395,2,0))

See the link to the workbook that implements the last version:
https://dl.dropboxusercontent.com/u...ays falling between a start and end date.xlsx
 
Upvote 0

Forum statistics

Threads
1,215,329
Messages
6,124,301
Members
449,149
Latest member
mwdbActuary

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