+ Reply to Thread
Results 1 to 7 of 7

Using WEEKDAY() as a criteria in AVERAGEIFS()

  1. #1
    Registered User
    Join Date
    02-03-2012
    Location
    USA
    MS-Off Ver
    Excel 2010
    Posts
    2

    Using WEEKDAY() as a criteria in AVERAGEIFS()

    I want to average a set of numbers A2:J2, but I only want to include for averaging numbers that also return a 1 on their corresponding A3:J3 cells as well as return a Thursday on their corresponding A1:J1 cells (of which is composed of dates in the form of mm/dd/yyyy).

    I tried
    Please Login or Register  to view this content.
    But, it doesn't work. I can't figure out how to get the WEEKDAY output to play nice with AVERAGEIFS function. Could anyone offer some insight? Much thanks.
    Attached Files Attached Files
    Last edited by carwashguy; 02-04-2012 at 01:22 AM.

  2. #2
    Forum Expert dilipandey's Avatar
    Join Date
    12-05-2011
    Location
    Dubai, UAE
    MS-Off Ver
    1997 - 2016
    Posts
    8,191

    Re: Using WEEKDAY() as a criteria in AVERAGEIFS()

    Hi carwashguy,

    Welcome to the forum.

    Do you want to average the numbers a2:j2 if they belong to thursdays only and if they have 1 just below them (both the conditions met) ?

    Regards,
    DILIPandey

    <click on below 'star' if this helps>
    DILIPandey, Excel rMVP
    +919810929744 (India), +971528225509 (Dubai), [email protected]

  3. #3
    Forum Expert dilipandey's Avatar
    Join Date
    12-05-2011
    Location
    Dubai, UAE
    MS-Off Ver
    1997 - 2016
    Posts
    8,191

    Re: Using WEEKDAY() as a criteria in AVERAGEIFS()

    No worries...

    Basis my above assumption, I have designed the formula to obtain the desired result. Check and let me know if this is what you were looking for. Thanks.

    Regards,
    DILIPandey

    <click on below 'star' if this helps>
    Attached Files Attached Files

  4. #4
    Registered User
    Join Date
    02-03-2012
    Location
    USA
    MS-Off Ver
    Excel 2010
    Posts
    2

    Re: Using WEEKDAY() as a criteria in AVERAGEIFS()

    I see. Thanks dilipandey. {=AVERAGE(IF((WEEKDAY($A$1:$J$1)=5)*($A$3:$J$3=1),$A$2:$J$2,""))} works for what I need.

  5. #5
    Forum Expert dilipandey's Avatar
    Join Date
    12-05-2011
    Location
    Dubai, UAE
    MS-Off Ver
    1997 - 2016
    Posts
    8,191

    Re: Using WEEKDAY() as a criteria in AVERAGEIFS()

    You are welcome....

    Cheers

    Regards,
    DILIPandey

    <click on below 'star' if this helps>

  6. #6
    Registered User
    Join Date
    09-24-2013
    Location
    Irvine, CA
    MS-Off Ver
    Excel 2010
    Posts
    4

    Re: Using WEEKDAY() as a criteria in AVERAGEIFS()

    Hi DILIPandey,

    This is almost exactly what I need, but I don't need to consider any values in row 3. I only need to average numbers in row 2 if they fall on a Thursday. I tried to remove the reference to row 3 from the formula {=AVERAGE(IF((WEEKDAY($A$1:$J$1)=5),$A$2:$J$2,""))}, but I get a #VALUE! result.

    Any help would be appreciated.

  7. #7
    Registered User
    Join Date
    09-24-2013
    Location
    Irvine, CA
    MS-Off Ver
    Excel 2010
    Posts
    4

    Re: Using WEEKDAY() as a criteria in AVERAGEIFS()

    Update!

    I fixed my problem. I wasn't entering the formula as an array, CTRL+SHIFT+ENTER.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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