+ Reply to Thread
Results 1 to 8 of 8

Excel 2007 : SUMIFS Formula Not Working

  1. #1
    Registered User
    Join Date
    10-03-2011
    Location
    London, England
    MS-Off Ver
    Excel 2007
    Posts
    51

    SUMIFS Formula Not Working

    Hello, I have written a formula to calculate the average values in column AE (based on several other conditions), as per the following:

    =SUM(SUMIFS(AE:AE,AA:AA,"Arabica Shift",AB:AB,">0",AD:AD,">0",F:F,"No"))/SUM(COUNTIFS(AA:AA,"Arabica Shift",AB:AB,">0",AD:AD,">0",F:F,"No",D:D,"1"))

    At the moment I am getting an error message but I can't spot my mistake....is anybody able to help, please? Do you need to know what all the other column references?

    I am trying to calculate the average value in column AE if.... AA=Arabica Shift, AB>0, AD>0, F="No", D="1"


    Many Thanks
    Last edited by milliemoo; 03-06-2012 at 12:17 PM. Reason: SOLVED

  2. #2
    Forum Expert
    Join Date
    07-16-2010
    Location
    Northumberland, UK
    MS-Off Ver
    Excel 2007 (home), Excel 2010 (work)
    Posts
    3,054

    Re: SUMIFS Formula Not Working

    The two SUM formula are surplus to requirements, so perhaps start by taking them out...

    =SUMIFS(AE:AE,AA:AA,"Arabica Shift",AB:AB,">0",AD:AD,">0",F:F,"No")/COUNTIFS(AA:AA,"Arabica Shift",AB:AB,">0",AD:AD,">0",F:F,"No",D:D,"1")

    I also note your SUMIF isn't considering column D - is that what you intended?

    Edited to add: If you told us what the error is then that would be useful.

  3. #3
    Forum Expert tigeravatar's Avatar
    Join Date
    03-25-2011
    Location
    Colorado, USA
    MS-Off Ver
    Excel 2003 - 2013
    Posts
    5,361

    Re: SUMIFS Formula Not Working

    milliemoo,

    If you can use sumifs, then why not just use averageifs?
    =AVERAGEIFS(AE:AE,AA:AA,"Arabica Shift",AB:AB,">0",AD:AD,">0",F:F,"No",D:D,1)
    Hope that helps,
    ~tigeravatar

    Forum Rules: How to use code tags, mark a thread solved, and keep yourself out of trouble

  4. #4
    Registered User
    Join Date
    10-03-2011
    Location
    London, England
    MS-Off Ver
    Excel 2007
    Posts
    51

    Re: SUMIFS Formula Not Working

    Hello Andrew, Thank you for your prompt reply. Column D refers to the financial period and so in t his example, I only want it to consider those entries where column D = 1....have I missed this out?? I thought I was being very clever figuring this our but clearly not!

  5. #5
    Registered User
    Join Date
    10-03-2011
    Location
    London, England
    MS-Off Ver
    Excel 2007
    Posts
    51

    Re: SUMIFS Formula Not Working

    Tigeravater - that makes so much more sense and appears to work! Thank you very much.

  6. #6
    Registered User
    Join Date
    10-03-2011
    Location
    London, England
    MS-Off Ver
    Excel 2007
    Posts
    51

    Re: SUMIFS Formula Not Working

    Also, I want to use this formula in a seperate worksheet within the same workbook but when I paste it in and change the reference cells, it brings up an error....it looked like this....

    =AVERAGEIFS('PIR Data'!AE:AE,'PIR Data'!AA:AA,"Arabica Shift",'PIR Data'!AB:AB,">0",'PIR Data'!AD:AD,">0",'PIR Data'!D:F,"No",'PIR Data'!D:D,1)

  7. #7
    Forum Expert tigeravatar's Avatar
    Join Date
    03-25-2011
    Location
    Colorado, USA
    MS-Off Ver
    Excel 2003 - 2013
    Posts
    5,361

    Re: SUMIFS Formula Not Working

    milliemoo,

    You have an incorrect reference in there. Change it from D:F to F:F
    Quote Originally Posted by milliemoo View Post
    =AVERAGEIFS('PIR Data'!AE:AE,'PIR Data'!AA:AA,"Arabica Shift",'PIR Data'!AB:AB,">0",'PIR Data'!AD:AD,">0",'PIR Data'!D:F,"No",'PIR Data'!D:D,1)

  8. #8
    Registered User
    Join Date
    10-03-2011
    Location
    London, England
    MS-Off Ver
    Excel 2007
    Posts
    51

    Re: SUMIFS Formula Not Working

    Perfect! Thank you. Will change to SOLVED

+ 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