Sum of Certain Age range People

krishhi

Active Member
Joined
Sep 8, 2008
Messages
328
Hello Guys,

I have a excel file, Let's say, In Column A their names and In B their Ages. So, I want a formula to calculate the age group of the people like

In C1 I need 0 - 18 age
In D2 I need 19 -25 age
In E2 I need 26 -45 age
In F2 I need 46 -75 age
In G2 I need 75 -90 age

Waiting for your kind reply,

Thanks,

Krrish
 

Excel Facts

Bring active cell back into view
Start at A1 and select to A9999 while writing a formula, you can't see A1 anymore. Press Ctrl+Backspace to bring active cell into view.
TRY THIS
Excel Workbook
ABCDEFG
1Names1 - 1819-2526-4546-7576-90
2Name 14424735
3Name 244
4Name 323
5Name 424
6Name 57
7Name 657
8Name 775
9Name 824
10Name 934
11Name 1043
12Name 1180
13Name 1228
14Name 1321
15Name 1462
16Name 1587
17Name 1687
18Name 1777
19Name 186
20Name 1988
21Name 2029
22Name 2131
Sheet3
Excel 2007
Cell Formulas
RangeFormula
C2=SUMPRODUCT(--($B$2:$B$22>=1),--($B$2:$B$22<=18))
D2=SUMPRODUCT(--($B$2:$B$22>=19),--($B$2:$B$22<=25))
E2=SUMPRODUCT(--($B$2:$B$22>=26),--($B$2:$B$22<=45))
F2=SUMPRODUCT(--($B$2:$B$22>=46),--($B$2:$B$22<=75))
G2=SUMPRODUCT(--($B$2:$B$22>=76),--($B$2:$B$22<=90))
 
Upvote 0
In Excel 2007 and above you can use COUNTIFS.

What about people over 90?
 
Upvote 0
Here you are:

Excel Workbook
ABCDEFGH
11Names1 to 1819-2526-4546-7576-90
22Name 14424735
33Name 244
44Name 323
55Name 424
66Name 57
77Name 657
88Name 775
99Name 824
1010Name 934
1111Name 1043
1212Name 1180
1313Name 1228
1414Name 1321
1515Name 1462
1616Name 1587
1717Name 1687
1818Name 1777
1919Name 186
2020Name 1988
2121Name 2029
2222Name 2131
Sheet4
 
Upvote 0
TRY THIS
Excel Workbook
ABCDEFG
1Names1 - 1819-2526-4546-7576-90
2Name 14424735
3Name 244
4Name 323
5Name 424
6Name 57
7Name 657
8Name 775
9Name 824
10Name 934
11Name 1043
12Name 1180
13Name 1228
14Name 1321
15Name 1462
16Name 1587
17Name 1687
18Name 1777
19Name 186
20Name 1988
21Name 2029
22Name 2131
Sheet3
Excel 2007
Cell Formulas
RangeFormula
C2=SUMPRODUCT(--($B$2:$B$22>=1),--($B$2:$B$22<=18))
D2=SUMPRODUCT(--($B$2:$B$22>=19),--($B$2:$B$22<=25))
E2=SUMPRODUCT(--($B$2:$B$22>=26),--($B$2:$B$22<=45))
F2=SUMPRODUCT(--($B$2:$B$22>=46),--($B$2:$B$22<=75))
G2=SUMPRODUCT(--($B$2:$B$22>=76),--($B$2:$B$22<=90))


Thank you very much,

If you don't mind, can you please explain the formula? I don't understand this part [ --] what is the symbols?

Thanks in advance,
Waiting for your reply
 
Upvote 0

Forum statistics

Threads
1,224,606
Messages
6,179,862
Members
452,948
Latest member
UsmanAli786

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