+ Reply to Thread
Results 1 to 5 of 5

Averaging both within a month and weekday

  1. #1
    Registered User
    Join Date
    01-08-2013
    Location
    Toronto
    MS-Off Ver
    Excel 2013
    Posts
    79

    Averaging both within a month and weekday

    Hello. I have searched everywhere and tried everything I know but cant seem to get this.

    I have daily data over many years. I would like to average the all of one weekday in the same month. For example, All Mondays in November over the course of many years.

    It is laid out like this:

    ...A............B.............C...................... BR..............BS
    1 DATE.......11/02/09...11/03/09.............02/14/16.....02/15/16
    2 VALUE......2.97.........3.45...................4.9.............1.9

    So using the date row I would like to average the Value row for specific days in specific months.

    Thanks so much!!!!!!!!!!!!

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

    Re: Averaging both within a month and weekday

    Try an array formula** like this...

    =AVERAGE(IF(WEEKDAY(B1:G1)=2,IF(MONTH(B1:G1)=11,B2:G2)))

    ** array formulas need to be entered using the key
    combination of CTRL,SHIFT,ENTER (not just ENTER).
    Hold down both the CTRL key and the SHIFT key
    then hit ENTER.

    Where WEEKDAY 2 = Monday and MONTH 11 = November.
    Biff
    Microsoft MVP Excel
    Keep It Simple Stupid

    Let's Go Pens. We Want The Cup.

  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: Averaging both within a month and weekday

    Quote Originally Posted by Tony Valko View Post
    Where WEEKDAY 2 = Monday
    The weekday numbers are...

    1 = Sun
    2 = Mon
    3 = Tue
    4 = Wed
    5 = Thu
    6 = Fri
    7 = Sat

  4. #4
    Registered User
    Join Date
    01-08-2013
    Location
    Toronto
    MS-Off Ver
    Excel 2013
    Posts
    79

    Re: Averaging both within a month and weekday

    That worked! Thank you Tony.

    I also want to count the cells within the same criteria, so I tried changing it to COUNTIF and it doesn't seem to work. Any suggestions?

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

    Re: Averaging both within a month and weekday

    For a count use...

    =SUMPRODUCT(--(WEEKDAY(B1:G1)=2),--(MONTH(B1:G1)=11))

+ 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. Averageing both witing a month and weekday
    By Brennen81 in forum Excel General
    Replies: 1
    Last Post: 01-21-2017, 01:32 PM
  2. [SOLVED] how to calculate the weekday from day of the month
    By John19 in forum Excel General
    Replies: 9
    Last Post: 07-12-2015, 05:17 AM
  3. [SOLVED] FIrst Weekday of the month
    By astrikor in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 06-04-2013, 09:28 AM
  4. Dynamic nth Day of Weekday-Next Month
    By nms2130 in forum Excel General
    Replies: 2
    Last Post: 06-29-2010, 09:56 AM
  5. [SOLVED] Weekday formula calculating to end of month
    By DebbieK in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 07-26-2006, 05:40 PM
  6. [SOLVED] nth weekday of the the month date problem
    By Thrashman in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-25-2006, 03:15 PM
  7. [SOLVED] Xth Weekday of the Month/Year
    By ZuludogM in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-15-2005, 07:05 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