+ Reply to Thread
Results 1 to 6 of 6

Sumproduct Formula Help

  1. #1
    Registered User
    Join Date
    01-17-2013
    Location
    United States
    MS-Off Ver
    Excel 2010
    Posts
    4

    Sumproduct Formula Help

    Hello!

    I'm having some trouble getting a simple Sumproduct function to work. Maybe there's a better function to tackle my problem?

    I'm creating a financial planner for an organization, and I need to be able to display all previous costs (spanning over multiple months and years), excluding the current month.

    Currently I have =SUMPRODUCT((J10:J12<>RefYear)*(J10:J12=RefYear&K10:K12<>RefMonth)*L10:L12), where the J column is my years, K is months, and L is the costs. Also, I just wrote in the Refs where my reference cells usually are for the current month and year.

    Basically, I want the sum of all costs, excluding the month for the current year.

    Help? I also may not be using the ampersand correctly, but I'm not sure how to create one array that fits two criteria.

  2. #2
    Valued Forum Contributor Melvinrobb's Avatar
    Join Date
    06-19-2012
    Location
    Manitoba, Canada
    MS-Off Ver
    Excel 2013
    Posts
    1,128

    Re: Sumproduct Formula Help

    Does this work?
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Please click the * icon below if I have helped.

  3. #3
    Registered User
    Join Date
    01-17-2013
    Location
    United States
    MS-Off Ver
    Excel 2010
    Posts
    4

    Re: Sumproduct Formula Help

    Wouldn't that exclude the RefMonth from previous years?

  4. #4
    Valued Forum Contributor Melvinrobb's Avatar
    Join Date
    06-19-2012
    Location
    Manitoba, Canada
    MS-Off Ver
    Excel 2013
    Posts
    1,128

    Re: Sumproduct Formula Help

    Basically, I want the sum of all costs, excluding the month for the current year.
    a couple of ways to interpret your request, but now I think I understand.
    the formula below should work. I broke it up into two sumproducts:
    The first sumproduct finds the totals from the current year, excluding the current month. The second sumproduct finds the total from previous years (no month filter applied).

    Formula: copy to clipboard
    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    01-17-2013
    Location
    United States
    MS-Off Ver
    Excel 2010
    Posts
    4

    Re: Sumproduct Formula Help

    Ha, thank you! A very simple solution, but it just couldn't figure it out in the moment. Thanks for your help!

  6. #6
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,933

    Re: Sumproduct Formula Help

    or perhaps using sumifS()?

    =SUMIFS(L10:L12,J10:J12<>RefYear,J10:J12=RefYear,K10:K12<>RefMonth)

    )or something like that - hard to put it together without seeing the data it is using
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

+ 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