• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

AverageIf

Sudhaji

New Member
Can someone let me know why my Average If statement does not work? File attached.

Thank y
 

Attachments

  • AverageIfs Confusion.xlsx
    11.7 KB · Views: 6
I would use:
=AVERAGEIFS(A6:BK6,A4:BK4,"<>S"&"*",A6:BK6,"<>"&0)

The section "<>S"&"*" only averages days that don't start with an "S"
Note the A6:BK6,"<>"&0 stops it averaging the cells with no data BD6:BK6
 
For the second attempt

If in Row 4 you had used =WEEKDAY(BI5,2)
then Sat = 6 and Sun =7
then you could have used:
=AVERAGEIFS(A6:BK6, A4:BK4,">"&5, A6:BK6,"<>"&0)
 
Can someone let me know why my Average If statement does not work? File attached.

Thank y

You have WKDAY AVG working properly, looking for values that are not weekends
=AVERAGEIFS(A6:BK6,A4:BK4,"<>7",A4:BK4,"<>1")

Following the same logic, you have to look for values that are not weekdays

WKEND AVG
=AVERAGEIFS(A6:BK6,A4:BK4,"<>2",A4:BK4,"<>3",A4:BK4,"<>4",A4:BK4,"<>5",A4:BK4,"<>6")

Why it doesn't work
=AVERAGEIFS(A6:BK6,A4:BK4,"=7",A4:BK4,"=1")
This looks for values that are equal to 7 AND equal to 1, but no cell can have 2 values so it returns 0.
 
Back
Top