Average last 14 Days

lex_m

Board Regular
Joined
Aug 5, 2003
Messages
155
I have data starting in B8 down, will be added to all the time, so with the sample data below how can I get and average for the last 14 days for column D, E and F.
Note this needs to be the last 14 days and not the last 14 rows. So in this case it would be 127 78 71

Thanks
Excel 2003



Excel 2003
BCDEF
7DateTimeSystolicDiastolicPulse
801/01/166:45 PM1408173
901/02/166:38 AM1267766
1001/02/162:44 PM1257277
1101/02/166:41 PM1257673
1201/03/168:02 AM1388264
1301/03/166:41 PM1468174
1401/04/166:47 AM1388261
1501/04/164:53 PM1458483
1601/05/167:06 AM1408373
1701/05/1610:32 PM1337675
1801/06/167:06 AM1408565
1901/06/169:05 PM1237180
2001/07/167:59 AM1388470
2101/08/167:08 AM1328065
2201/08/167:12 PM1126786
2301/09/166:37 AM1198269
2401/09/161:10 PM1257684
2501/10/167:11 AM1356680
2601/11/167:46 AM1318365
2701/12/168:17 AM1468665
2801/12/1612:32 PM1237765
2901/13/167:15 AM1308169
3001/14/168:34 AM1218170
3101/15/167:26 AM1257568
3201/15/167:22 PM1357965
3301/16/167:15 AM1268464
3401/17/168:33 AM1177768
3501/17/164:05 PM1317081
3601/18/167:54 AM1267667
3701/19/169:28 AM1218062
3801/19/1611:32 AM1077172
3901/20/168:36 AM1388272
Sheet1
 

Excel Facts

Is there a shortcut key for strikethrough?
Ctrl+S is used for Save. Ctrl+5 is used for Strikethrough. Why Ctrl+5? When you use hashmarks to count |||| is 4, strike through to mean 5.
Which version of Excel are you using?

Excel 2007+, try

=AVERAGEIF($B$8:$B$39,">="&TODAY()-14,D$8:D$39)
 
Last edited:
Upvote 0
In that case, you'll need an array formula entered with CTRL + SHIFT + ENTER

=AVERAGE(IF($B$8:$B$39>=TODAY()-14,D$8:D$39))
 
Upvote 0
You're welcome.

Also, this may seem more cumbersome, but it may actually be more efficient (not an array formula)

=SUMIF($B$8:$B$39,">="&TODAY()-14,D$8:D$39)/COUNTIF($B$8:$B$39,">="&TODAY()-14)
 
Upvote 0

Forum statistics

Threads
1,215,430
Messages
6,124,847
Members
449,194
Latest member
HellScout

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