Averaging on specific day of the week YTD

julesdr

New Member
Joined
Jan 5, 2018
Messages
7
Ok, so I built a spreadsheet to track my running throughout the year and I'm trying to see what my averages are on each day of the week. Through an exhaustive search, I can only come up with the following formula

Code:
=AVERAGE(IF(WEEKDAY(A2:A366)=2,B2:B366))

Column A is the Date where Column B is Miles Ran

But the problem with this formula is that it grabs all the zeroes from the rest of the Mondays in the year and so my average miles ran on a Monday is 0. I have tried using a helper column to only grab currently dated cells with AVERAGEIFS, but I end up with #value ! returned...

I am also having the same problem with my monthly averages as I'd like to see my average miles per day in a given month but on a MTD basis...

Thanks in advance for the help!
 

Excel Facts

Formula for Yesterday
Name Manager, New Name. Yesterday =TODAY()-1. OK. Then, use =YESTERDAY in any cell. Tomorrow could be =TODAY()+1.
Hello
Try This:

Code:
=[COLOR=#333333]AVERAGE[/COLOR](if([COLOR=#333333]WEEKDAY[/COLOR](A2:A28)=2;if(B2:B28>0;B2:B28)))

Note: Must end with "CTRL + SHIFT + ENTER"
 
Upvote 0
Do you want an average of just the days when you ran? Or are the days that you decided not to run to be included in the average?
 
Upvote 0
I would like days that I don’t run included for and accurate average, just not the zeroes on future days...
 
Upvote 0
You could try:

=AVERAGE(IF(WEEKDAY(A2:A366)=2,IF(A2:A366<=TODAY(),B2:B366)))
 
Upvote 0
All right, I had to basically reverse Steve the fishs formula to:

Code:
{=AVERAGE(IF(A2:A366<=TODAY,IF(WEEKDAY(A2:A366)=2,B2:B366)))}

The way Steve originally wrote it was basically, "If the day is Tuesday, calculate the average of all cells in column B that are dated 1/1 to today." vs "In cells dated 1/1 to today, calculate the average on Tuesdays."

Thank you for the help guys!
 
Upvote 0

Forum statistics

Threads
1,223,903
Messages
6,175,284
Members
452,630
Latest member
OdubiYouth

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