+ Reply to Thread
Results 1 to 6 of 6

AVERAGEIF Date Criteria

  1. #1
    Registered User
    Join Date
    05-31-2017
    Location
    Brunswick, ME
    MS-Off Ver
    2013 (work) and 365 (home)
    Posts
    70

    AVERAGEIF Date Criteria

    I collect data every weekday, and I'm trying to find the average of each day but am encountering the Div/0 error because Excel only sees the date information and not the day formatting. (See attachment).

    So, I want the average of Monday data, Tuesday data, etc. Is there a way to do this?
    Attached Files Attached Files

  2. #2
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,914

    Re: AVERAGEIF Date Criteria

    That's because there is no "Mon", etc., in the cells that are being referenced. The day name is showing because of the formatting, but it's not in the underlying cell's value, which is just a date.
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  3. #3
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,914

    Re: AVERAGEIF Date Criteria

    Try this:

    =AVERAGE(IF(WEEKDAY($B$2:$K$2,2)=1,$B$3:$K$3))

    ... confirmed by pressing CTRL+SHIFT+ENTER to activate the array, not just ENTER. You will know the array is active when you see curly braces { } appear around your formula. If you do not CTRL+SHIFT+ENTER you will get an error or a clearly incorrect answer.

  4. #4
    Forum Expert 63falcondude's Avatar
    Join Date
    08-22-2016
    Location
    USA
    MS-Off Ver
    365
    Posts
    6,266

    Re: AVERAGEIF Date Criteria

    Here's an alternative:

    =AVERAGE(IF(TEXT($B$2:$K$2,"ddd")="Mon",$B$3:$K$3)) Ctrl Shift Enter

  5. #5
    Registered User
    Join Date
    05-31-2017
    Location
    Brunswick, ME
    MS-Off Ver
    2013 (work) and 365 (home)
    Posts
    70

    Re: AVERAGEIF Date Criteria

    Thanks to both of you! I went with AliGW's solution.

  6. #6
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,914

    Re: AVERAGEIF Date Criteria

    Glad to have helped!

+ 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. Averageif criteria
    By wpryan in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 11-03-2015, 07:11 AM
  2. Averageif for the top 70,80,90% and based on a criteria
    By skate1991 in forum Excel General
    Replies: 16
    Last Post: 05-06-2015, 12:54 PM
  3. Multiple Criteria AverageIF
    By orev2 in forum Excel General
    Replies: 1
    Last Post: 08-19-2014, 01:18 PM
  4. averageif formula with multiple criteria
    By CPitta in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 10-08-2013, 12:56 PM
  5. AverageIf based on different criteria
    By caseman in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 01-16-2013, 02:18 PM
  6. Criteria question - AverageIF (if you please)
    By djalexr in forum Excel General
    Replies: 3
    Last Post: 01-14-2011, 08:00 AM
  7. AverageIf based on another columns criteria
    By AllenMead in forum Excel General
    Replies: 7
    Last Post: 09-06-2010, 12:46 PM

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