Put Age into a Particular set age group bracket display

Leicester City Fox

Board Regular
Joined
Oct 7, 2016
Messages
91
Office Version
  1. 2019
Platform
  1. Windows
Hi All

Good Morning

I have a set of data and I work out their age from the DOB. I was going to group the Ages in a pivot age group bracket but can’t get it to fit the age bracket displayed given below any ideas how to get my data into Age Group requested?

Age Group Specified:

29 or Under

30-39

40-49

50-59

60-69

70-79

80+

Be grateful for the best and assist way to set this ag grouping above.



Many Thanks

The Leicester Fox
 

Excel Facts

What is the shortcut key for Format Selection?
Ctrl+1 (the number one) will open the Format dialog for whatever is selected.
You could do this with a rather complicated formula as shown here...note that I've made some interpretations of the age brackets in that a person's years must be greater than or equal to the lower bound and less than the upper bound. The formula for extracting the list of names is placed in cell B5 (in this case) and then copied across to H5. Then B5:H5 is selected and dragged down until no more names are added to any of the columns.
Book1
ABCDEFGHIJKLMN
13/26/2020<--Today
2>=0304050607080Age
3<304050607080999NamesDOByearsmonthsdays
4Age Group Specified:29 or Under30-3940-4950-5960-6970-7980+Keon Rogers6/15/193782911
5Cherish RiceAlonzo NashKadence GilmoreMalcolm ShawAngelo ZunigaSeth FlynnKeon RogersCherish Rice11/30/199623325
6Aria MorseKate CrawfordCoby JacobsonVan RandolphAmani RiddleKoen BirdShayna HouseAria Morse9/5/200910621
7Charlie MooreMorgan SullivanJocelyn MillsSarai NewmanSophia BartonLauryn GallagherAimee PachecoMalcolm Shaw9/22/19615864
8Lilah ShepherdMira ParkLewis HamptonKayden FischerJanae MontgomeryAnabel AyersPenelope HarrisAngelo Zuniga10/3/195366523
9Phoenix LucasKatherine FreyMakhi KnoxAshlyn CisnerosSophia CooleyChloe LiPedro PowellSeth Flynn10/18/19407958
10Conner ShafferSolomon HancockLennon MiddletonVan BarrZayne BurgessCason OnealRebekah RushKadence Gilmore9/22/19794064
11Rosa VillaKieran FitzgeraldDalton HickmanRoyce LoveGisselle FrostFaith WashingtonElianna MunozKoen Bird4/24/194178112
12Amara RamirezArturo RangelBrenna FergusonCallie Bruce Jacquelyn LambMadelyn HuertaShayna House2/29/193288026
13Shania WatersTerrance HoweJaidyn DodsonJaqueline Randolph Susan CarrilloKadin PierceAimee Pacheco7/20/19348586
14Brooklynn Cortez Rashad ClarkLilia Kennedy  Emiliano AdkinsAmani Riddle10/7/195267519
15Felicity Williamson Avery HebertRoy Ponce  Erica HarringtonVan Randolph3/11/196951015
16Uriel Daugherty  Donte Michael   Penelope Harris8/16/193683710
17Cristian Dalton  Cameron Goodman   Sophia Barton7/27/195069728
18Tori Estrada  Kaleb Jordan   Sarai Newman11/18/19675248
19Brice Bryan  Easton Mullen   Pedro Powell3/11/193387015
20   Rebekah Watkins   Rebekah Rush10/19/19308957
21   Dean Leonard   Coby Jacobson3/25/19754501
22   Brooklynn Nunez   Jocelyn Mills10/5/197346521
23       Charlie Moore6/18/20031698
24       Alonzo Nash5/12/1988311014
25       Elianna Munoz12/5/193485321
26Lauryn Gallagher10/9/194178517
27Lilah Shepherd1/28/200218127
28Kayden Fischer7/3/196752823
29Phoenix Lucas1/24/20051522
30Kate Crawford11/17/19843549
31Conner Shaffer3/16/200812010
32Janae Montgomery4/22/195366114
33Ashlyn Cisneros12/30/196455225
34Lewis Hampton6/11/197643915
35Rosa Villa1/1/200515225
36Makhi Knox4/10/1972471116
37Van Barr11/26/19675240
38Royce Love9/4/196455622
39Callie Bruce12/13/196554313
40Lennon Middleton9/16/197346610
41Jaqueline Randolph3/3/196456023
42Lilia Kennedy5/11/1966531015
43Roy Ponce6/1/196455925
44Sophia Cooley3/18/19516908
45Morgan Sullivan2/26/19893110
46Dalton Hickman10/3/197841523
47Mira Park5/25/198336101
48Amara Ramirez7/22/19902984
49Shania Waters1/19/20031727
50Brenna Ferguson6/23/19794093
51Donte Michael9/9/196653617
52Madelyn Huerta1/6/193486220
53Katherine Frey4/30/1987321025
54Anabel Ayers12/27/194475228
55Solomon Hancock6/8/198138918
56Chloe Li7/23/19417883
57Cason Oneal9/6/194475620
58Zayne Burgess2/26/19586210
59Cameron Goodman11/8/196950418
60Brooklynn Cortez1/16/200416210
61Kieran Fitzgerald7/2/198039824
62Jaidyn Dodson11/3/197841423
63Arturo Rangel12/8/198039318
64Terrance Howe10/29/198138426
65Rashad Clark8/12/197247714
66Kaleb Jordan7/29/196455726
67Easton Mullen7/4/196356822
68Kadin Pierce3/16/193783010
69Rebekah Watkins6/16/196851910
70Emiliano Adkins7/4/193683822
71Avery Hebert10/21/19774255
72Felicity Williamson9/24/19962362
73Uriel Daugherty11/19/20091047
74Cristian Dalton6/20/19922796
75Tori Estrada5/14/1993261012
76Faith Washington10/25/19457451
77Erica Harrington6/27/193881828
78Jacquelyn Lamb8/4/194673722
79Susan Carrillo12/15/194277311
80Dean Leonard3/18/19675308
81Brooklynn Nunez7/21/19635685
82Brice Bryan8/21/20051475
83Gisselle Frost2/10/195664116
Sheet1
Cell Formulas
RangeFormula
L1L1=TODAY()
L4:L83L4=DATEDIF($K4,$L$1,"Y")
M4:M83M4=DATEDIF($K4,$L$1,"YM")
N4:N83N4=DATEDIF($K4,$L$1,"MD")
B25,B5:H24B5=IF(ROWS($J$4:J4)<=COUNTIFS($L$4:$L$83,">="&B$2,$L$4:$L$83,"<"&B$3),INDEX($J$4:$J$83,AGGREGATE(15,3,((($L$4:$L$83>=B$2)*($L$4:$L$83<B$3))/(($L$4:$L$83>=B$2)*($L$4:$L$83<B$3))*ROW($L$4:$L$83))-ROW($L$3), ROWS($B$5:B5))),"")
C25:H25C25=IF(ROWS($J$4:J24)<=COUNTIFS($L$4:$L$83,">="&C$2,$L$4:$L$83,"<"&C$3),INDEX($J$4:$J$83,AGGREGATE(15,3,((($L$4:$L$83>=C$2)*($L$4:$L$83<C$3))/(($L$4:$L$83>=C$2)*($L$4:$L$83<C$3))*ROW($L$4:$L$83))-ROW($L$3), ROWS($B$5:C25))),"")
 
Upvote 0
I suggest that you update your Account details (click your user name at the top right of the forum) so helpers always know what Excel version(s) & platform(s) you are using as the best solution often varies by version.

For example, IF you have Excel 365 with the FILTER function, you simply need to put this formula in B5 and copy across row 5. The other results will automatically "spill" down the relevant columns.

20 03 27.xlsm
ABCDEFGHIJK
127/03/2020<--Today
2>=0304050607080
3<304050607080120NamesDOB
4Age Group29 or Under30-3940-4950-5960-6970-7980+Keon Rogers15/06/1937
5Cherish RiceAlonzo NashKadence GilmoreMalcolm ShawAngelo ZunigaSeth FlynnKeon RogersCherish Rice30/11/1996
6Aria MorseKate CrawfordCoby JacobsonVan RandolphAmani RiddleKoen BirdShayna HouseAria Morse5/09/2009
7Charlie MooreMorgan SullivanJocelyn MillsSarai NewmanSophia BartonLauryn GallagherAimee PachecoMalcolm Shaw22/09/1961
8Lilah ShepherdMira ParkLewis HamptonKayden FischerJanae MontgomeryAnabel AyersPenelope HarrisAngelo Zuniga3/10/1953
9Phoenix LucasKatherine FreyMakhi KnoxAshlyn CisnerosSophia CooleyChloe LiPedro PowellSeth Flynn18/10/1940
10Conner ShafferSolomon HancockLennon MiddletonVan BarrZayne BurgessCason OnealRebekah RushKadence Gilmore22/09/1979
11Rosa VillaKieran FitzgeraldDalton HickmanRoyce LoveGisselle FrostFaith WashingtonElianna MunozKoen Bird24/04/1941
12Amara RamirezArturo RangelBrenna FergusonCallie BruceJacquelyn LambMadelyn HuertaShayna House29/02/1932
13Shania WatersTerrance HoweJaidyn DodsonJaqueline RandolphSusan CarrilloKadin PierceAimee Pacheco20/07/1934
14Brooklynn CortezRashad ClarkLilia KennedyEmiliano AdkinsAmani Riddle7/10/1952
15Felicity WilliamsonAvery HebertRoy PonceErica HarringtonVan Randolph11/03/1969
16Uriel DaughertyDonte MichaelPenelope Harris16/08/1936
17Cristian DaltonCameron GoodmanSophia Barton27/07/1950
18Tori EstradaKaleb JordanSarai Newman18/11/1967
19Brice BryanEaston MullenPedro Powell11/03/1933
20Rebekah WatkinsRebekah Rush19/10/1930
21Dean LeonardCoby Jacobson25/03/1975
22Brooklynn NunezJocelyn Mills5/10/1973
23Charlie Moore18/06/2003
24Alonzo Nash12/05/1988
25Elianna Munoz5/12/1934
26Lauryn Gallagher9/10/1941
27Lilah Shepherd28/01/2002
28Kayden Fischer3/07/1967
29Phoenix Lucas24/01/2005
30Kate Crawford17/11/1984
31Conner Shaffer16/03/2008
32Janae Montgomery22/04/1953
33Ashlyn Cisneros30/12/1964
34Lewis Hampton11/06/1976
35Rosa Villa1/01/2005
36Makhi Knox10/04/1972
37Van Barr26/11/1967
38Royce Love4/09/1964
39Callie Bruce13/12/1965
40Lennon Middleton16/09/1973
41Jaqueline Randolph3/03/1964
42Lilia Kennedy11/05/1966
43Roy Ponce1/06/1964
44Sophia Cooley18/03/1951
45Morgan Sullivan26/02/1989
46Dalton Hickman3/10/1978
47Mira Park25/05/1983
48Amara Ramirez22/07/1990
49Shania Waters19/01/2003
50Brenna Ferguson23/06/1979
51Donte Michael9/09/1966
52Madelyn Huerta6/01/1934
53Katherine Frey30/04/1987
54Anabel Ayers27/12/1944
55Solomon Hancock8/06/1981
56Chloe Li23/07/1941
57Cason Oneal6/09/1944
58Zayne Burgess26/02/1958
59Cameron Goodman8/11/1969
60Brooklynn Cortez16/01/2004
61Kieran Fitzgerald2/07/1980
62Jaidyn Dodson3/11/1978
63Arturo Rangel8/12/1980
64Terrance Howe29/10/1981
65Rashad Clark12/08/1972
66Kaleb Jordan29/07/1964
67Easton Mullen4/07/1963
68Kadin Pierce16/03/1937
69Rebekah Watkins16/06/1968
70Emiliano Adkins4/07/1936
71Avery Hebert21/10/1977
72Felicity Williamson24/09/1996
73Uriel Daugherty19/11/2009
74Cristian Dalton20/06/1992
75Tori Estrada14/05/1993
76Faith Washington25/10/1945
77Erica Harrington27/06/1938
78Jacquelyn Lamb4/08/1946
79Susan Carrillo15/12/1942
80Dean Leonard18/03/1967
81Brooklynn Nunez21/07/1963
82Brice Bryan21/08/2005
83Gisselle Frost10/02/1956
Ages Dynamic Arrays
Cell Formulas
RangeFormula
J1J1=TODAY()
B5:B19,H5:H15,G5:G13,F5:F11,E5:E22,D5:D15,C5:C13B5=FILTER($J$4:$J$83,($K$4:$K$83<=EDATE($J$1,-12*B$2))*($K$4:$K$83>EDATE($J$1,-12*B$3)))
Dynamic array formulas.



IF you don't have FILTER but do have Excel 2010 or later ..
This B5 formula copied across and down

20 03 27.xlsm
ABCDEFGHIJK
127/03/2020<--Today
2>=0304050607080
3<304050607080120NamesDOB
4Age Group29 or Under30-3940-4950-5960-6970-7980+Keon Rogers15/06/1937
5Cherish RiceAlonzo NashKadence GilmoreMalcolm ShawAngelo ZunigaSeth FlynnKeon RogersCherish Rice30/11/1996
6Aria MorseKate CrawfordCoby JacobsonVan RandolphAmani RiddleKoen BirdShayna HouseAria Morse5/09/2009
7Charlie MooreMorgan SullivanJocelyn MillsSarai NewmanSophia BartonLauryn GallagherAimee PachecoMalcolm Shaw22/09/1961
8Lilah ShepherdMira ParkLewis HamptonKayden FischerJanae MontgomeryAnabel AyersPenelope HarrisAngelo Zuniga3/10/1953
9Phoenix LucasKatherine FreyMakhi KnoxAshlyn CisnerosSophia CooleyChloe LiPedro PowellSeth Flynn18/10/1940
10Conner ShafferSolomon HancockLennon MiddletonVan BarrZayne BurgessCason OnealRebekah RushKadence Gilmore22/09/1979
11Rosa VillaKieran FitzgeraldDalton HickmanRoyce LoveGisselle FrostFaith WashingtonElianna MunozKoen Bird24/04/1941
12Amara RamirezArturo RangelBrenna FergusonCallie Bruce Jacquelyn LambMadelyn HuertaShayna House29/02/1932
13Shania WatersTerrance HoweJaidyn DodsonJaqueline Randolph Susan CarrilloKadin PierceAimee Pacheco20/07/1934
14Brooklynn Cortez Rashad ClarkLilia Kennedy  Emiliano AdkinsAmani Riddle7/10/1952
15Felicity Williamson Avery HebertRoy Ponce  Erica HarringtonVan Randolph11/03/1969
16Uriel Daugherty  Donte Michael   Penelope Harris16/08/1936
17Cristian Dalton  Cameron Goodman   Sophia Barton27/07/1950
18Tori Estrada  Kaleb Jordan   Sarai Newman18/11/1967
19Brice Bryan  Easton Mullen   Pedro Powell11/03/1933
20   Rebekah Watkins   Rebekah Rush19/10/1930
21   Dean Leonard   Coby Jacobson25/03/1975
22   Brooklynn Nunez   Jocelyn Mills5/10/1973
23       Charlie Moore18/06/2003
24       Alonzo Nash12/05/1988
25Elianna Munoz5/12/1934
26Lauryn Gallagher9/10/1941
27Lilah Shepherd28/01/2002
28Kayden Fischer3/07/1967
29Phoenix Lucas24/01/2005
30Kate Crawford17/11/1984
31Conner Shaffer16/03/2008
32Janae Montgomery22/04/1953
33Ashlyn Cisneros30/12/1964
34Lewis Hampton11/06/1976
35Rosa Villa1/01/2005
36Makhi Knox10/04/1972
37Van Barr26/11/1967
38Royce Love4/09/1964
39Callie Bruce13/12/1965
40Lennon Middleton16/09/1973
41Jaqueline Randolph3/03/1964
42Lilia Kennedy11/05/1966
43Roy Ponce1/06/1964
44Sophia Cooley18/03/1951
45Morgan Sullivan26/02/1989
46Dalton Hickman3/10/1978
47Mira Park25/05/1983
48Amara Ramirez22/07/1990
49Shania Waters19/01/2003
50Brenna Ferguson23/06/1979
51Donte Michael9/09/1966
52Madelyn Huerta6/01/1934
53Katherine Frey30/04/1987
54Anabel Ayers27/12/1944
55Solomon Hancock8/06/1981
56Chloe Li23/07/1941
57Cason Oneal6/09/1944
58Zayne Burgess26/02/1958
59Cameron Goodman8/11/1969
60Brooklynn Cortez16/01/2004
61Kieran Fitzgerald2/07/1980
62Jaidyn Dodson3/11/1978
63Arturo Rangel8/12/1980
64Terrance Howe29/10/1981
65Rashad Clark12/08/1972
66Kaleb Jordan29/07/1964
67Easton Mullen4/07/1963
68Kadin Pierce16/03/1937
69Rebekah Watkins16/06/1968
70Emiliano Adkins4/07/1936
71Avery Hebert21/10/1977
72Felicity Williamson24/09/1996
73Uriel Daugherty19/11/2009
74Cristian Dalton20/06/1992
75Tori Estrada14/05/1993
76Faith Washington25/10/1945
77Erica Harrington27/06/1938
78Jacquelyn Lamb4/08/1946
79Susan Carrillo15/12/1942
80Dean Leonard18/03/1967
81Brooklynn Nunez21/07/1963
82Brice Bryan21/08/2005
83Gisselle Frost10/02/1956
Ages Excel 2010+
Cell Formulas
RangeFormula
J1J1=TODAY()
B5:H24B5=IFERROR(INDEX($J:$J,AGGREGATE(15,6,ROW($J$4:$J$83)/(($K$4:$K$83<=EDATE($J$1,-12*B$2))*($K$4:$K$83>EDATE($J$1,-12*B$3))),ROWS(B$5:B5))),"")
 
Upvote 0

Forum statistics

Threads
1,215,223
Messages
6,123,722
Members
449,116
Latest member
Aaagu

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