+ Reply to Thread
Results 1 to 10 of 10

Saturdays not working with AVERAGE

  1. #1
    Registered User
    Join Date
    11-01-2016
    Location
    AC, NJ
    MS-Off Ver
    2007
    Posts
    24

    Saturdays not working with AVERAGE

    Hi.

    I am working on a sheet to help with my business.

    I am trying to find averages for days of the week.

    Column A has dates.

    Column F has numbers (sum of columns b:e)

    then i am using this: =AVERAGE(IF(TEXT(A1:A9998,"ddd")="sun",F1:F9998)) and changing sun to mon, tue, wed, thu, fri and it works perfectly, but when I change it to sat i get a VERY low number

    I tried it doing it like this too =AVERAGE(IF(WEEKDAY(A1:A9999)=7,F1:F9998)) 1, 2, 3, 4, 5, 6 work correct, but when I change to 7 it gives me #N/A

    What am I missing?

  2. #2
    Forum Guru Jonmo1's Avatar
    Join Date
    03-08-2013
    Location
    Bryan, TX
    MS-Off Ver
    Excel 2010
    Posts
    9,763

    Re: Saturdays not working with AVERAGE

    Blank cells will be treated as Saturday by the TEXT function.

    Add a criteria for Not Blank

    =AVERAGE(IF(TEXT(A1:A9998,"ddd")="sat",IF(A1:A9998<>"",F1:F9998)))

  3. #3
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Saturdays not working with AVERAGE

    Empty cells will evaluate as weekday Saturday!

    Test that the cells do in fact contain dates:

    =AVERAGE(IF(ISNUMBER(A1:A9998),IF(TEXT(A1:A9998,"ddd")="sat",F1:F9998)))

    Still array entered.
    Biff
    Microsoft MVP Excel
    Keep It Simple Stupid

    Let's Go Pens. We Want The Cup.

  4. #4
    Registered User
    Join Date
    11-01-2016
    Location
    AC, NJ
    MS-Off Ver
    2007
    Posts
    24

    Re: Saturdays not working with AVERAGE

    Thank you guys!

    I couldn't figure that out..

    much appreciated!

  5. #5
    Forum Guru Jonmo1's Avatar
    Join Date
    03-08-2013
    Location
    Bryan, TX
    MS-Off Ver
    Excel 2010
    Posts
    9,763

    Re: Saturdays not working with AVERAGE

    You're welcome.

  6. #6
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Saturdays not working with AVERAGE

    You're welcome. Thanks for the feedback!

  7. #7
    Registered User
    Join Date
    11-01-2016
    Location
    AC, NJ
    MS-Off Ver
    2007
    Posts
    24

    Re: Saturdays not working with AVERAGE

    While I have you guys here, another question.

    I think the same issue is happening with months/years..

    I am using: =SUMPRODUCT((MONTH(A1:A9998)=9)*(YEAR(A1:A9998)=2016)*(F1:F9998)) and I am getting an error, probably need the same not blank criteria IF(A1:A9998<>"",F1:F9998) in it somewhere, right?

  8. #8
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Saturdays not working with AVERAGE

    One way...

    =SUMPRODUCT(--(TEXT(A1:A9998,"myyyy")="92016"),F1:F9998)

  9. #9
    Registered User
    Join Date
    11-01-2016
    Location
    AC, NJ
    MS-Off Ver
    2007
    Posts
    24

    Re: Saturdays not working with AVERAGE

    Good enough for me.

    Thanks again.

    Have a good week.

  10. #10
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Saturdays not working with AVERAGE

    You're welcome!

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Replies: 0
    Last Post: 02-04-2015, 06:39 AM
  2. AVERAGE (IF()) not working
    By Faridwahidi in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 05-17-2014, 01:25 AM
  3. Counting How Many Saturdays
    By Nikki Fox in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 07-24-2013, 04:30 AM
  4. Working Hours between 2 dates (including Saturdays with Diff hours)
    By ejou11 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 05-02-2013, 07:39 AM
  5. Replies: 1
    Last Post: 08-22-2012, 10:38 AM
  6. average not working
    By mtsf in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 11-05-2011, 04:53 AM
  7. Working the average
    By Pjcan1 in forum Excel General
    Replies: 3
    Last Post: 11-30-2009, 10:27 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1