+ Reply to Thread
Results 1 to 4 of 4

Problem with averageifs()

  1. #1
    Registered User
    Join Date
    04-21-2010
    Location
    Cairo
    MS-Off Ver
    Excel 2007
    Posts
    3

    Problem with averageifs()

    Hello Excel experts,

    I would like to ask you for some help. I have an Excel 2007 table with two columns: month and amount. I want to get the average of the amount excluding the current month. I am using =AVERAGEIFS(MyTable[Amount], MyTable[Month], "<>"&B1), where B1 = "April 2010". However, the calculation seems to get the average wrong, as it counts the amount corresponding to April 2010. Would someone please help? I am attaching an example sheet.
    Attached Files Attached Files
    Last edited by ramyomar; 04-25-2010 at 01:15 AM.

  2. #2
    Registered User
    Join Date
    04-21-2010
    Location
    Cairo
    MS-Off Ver
    Excel 2007
    Posts
    3

    Re: Problem with averageifs()

    As a quick workaround, I used this:

    Please Login or Register  to view this content.

    But I would still love to use averageifs(), as it is much more readable.
    Last edited by ramyomar; 04-25-2010 at 02:37 AM.

  3. #3
    Forum Expert teylyn's Avatar
    Join Date
    10-28-2008
    Location
    New Zealand
    MS-Off Ver
    Excel 365 Insider Fast
    Posts
    11,372

    Re: Problem with averageifs()

    First, I have no explanation why the current formula does not work. Comparing

    =B1<>A21

    in your attached file delivers FALSE, by logic, this row should be excluded from the AVERAGEIFS.

    But then, I never really trust dates in text format.

    If you change your texts to real dates, starting with 1-Nov-2008 and incrementing the month every row, you can then use this formula in B1

    =DATE(YEAR(NOW()),MONTH(NOW()),1)

    and your ARVERAGEIFS will compute fine.

    See attached.
    Attached Files Attached Files

  4. #4
    Registered User
    Join Date
    04-21-2010
    Location
    Cairo
    MS-Off Ver
    Excel 2007
    Posts
    3

    Re: Problem with averageifs()

    That was of great help. Thanks a lot!

    Looks like I will start distrusting dates in text format too

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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