Formula to Calculate Age for Visible Rows

PMcGinness

New Member
Joined
Oct 17, 2023
Messages
6
Office Version
  1. 365
Platform
  1. Windows
I recently started to enjoy using the subtotal function for some of my student reports (I work in Higher Ed).

I would love to have something where I can age update as I filter by rows. I have a registration date in Column R and a student's DOB in K. I know how to calculate age, but is there a way to have this value to changed based on just my visible rows?

Thanks for any help.
 

Excel Facts

Test for Multiple Conditions in IF?
Use AND(test, test, test, test) or OR(test, test, test, ...) as the logical_test argument of IF.
why do you want to recalculate age based on a visible row(s)? Isn't age the same regardless of the row being visible or not?
 
Upvote 0
why do you want to recalculate age based on a visible row(s)? Isn't age the same regardless of the row being visible or not?
I have to report the average age of someone based on what class they are in.
 
Upvote 0
I have to report the average age of someone based on what class they are in.
okay, I misunderstood your question.

instead of SUBTOTAL use AGGREGATE (and choose to ignore hidden rows).

Mr excel questions 68.xlsm
ABCD
1ClassDOBAGE
2Class_12000-10-2722
3Class_22003-02-2520
4Class_22001-03-0722
5Class_22003-01-2920
6Class_12002-03-0121
7Class_12002-05-1921
8Class_12000-09-1423
9Class_22000-06-1623
10Class_12002-04-1321
11Class_22002-02-1921
12Class_12002-03-0221
13Class_12002-11-3020
14Class_12001-05-1622
15Class_22003-03-1320
16Class_12001-07-2922
17
18AverageAge:21.267
PMcGinness
Cell Formulas
RangeFormula
D2:D16D2=ROUNDDOWN((TODAY()-C2)/365.25,0)
D18D18=AGGREGATE(1,3,D2:D16)
 
Upvote 1
Solution

Forum statistics

Threads
1,223,903
Messages
6,175,289
Members
452,631
Latest member
a_potato

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