AVERAGEIF question

Tazzbjs

New Member
Joined
Nov 2, 2011
Messages
33
I want to average all cells in a row based on the day of the week in another row and I only want it to include cells greater then 0. Essentially for the average returned in R2, the range is A2:N2, if A1:N1 is Sunday, return average for sundays and only include in the average if cell in row 2 is >0. I know this was a complicated explanation, but the best way I could tink to explain it.

ABCDEFGHIJKLMNOPQR
1SaturdaySundayMondayTuesdayWednesdayThursdayFridaySaturdaySundayMondayTuesdayWednesdayThursdayFridayDAYAVG
21193623624625525424811633241252265262254Sun
3Mon
4Tues
5Wed
6Thur
7Fri
8Sat

<tbody>
</tbody>
 

Excel Facts

Copy PDF to Excel
Select data in PDF. Paste to Microsoft Word. Copy from Word and paste to Excel.
Start by making sure that the strings in column Q are the same as the strings in row 1. "Sunday", "Monday" etc, or "Sun", "Mon" etc.

(Or is the difference part of the problem that you need to solve?)

Then if you have Excel 2010 (2007?) or later, enter the following into R2 and copy down:

=AVERAGEIFS($A$2:$N$2, $A$2:$N$2, ">0", $A$1:$N$1, Q2)

If AVERAGEIFS does not work for you (#NAME error), let us know.
 
Last edited:
Upvote 0
Solution
So A1:N1 is text, NOT a date with a formatted cell that returns the day of the week?

Does this work?

=AVERAGEIFS(A2:N2,A1:N1,"Sunday",A2:N2,">0")
 
Upvote 0

Forum statistics

Threads
1,214,641
Messages
6,120,693
Members
448,979
Latest member
DET4492

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