+ Reply to Thread
Results 1 to 11 of 11

sumproduct subtotal offset with multiple criteria

  1. #1
    Registered User
    Join Date
    11-07-2014
    Location
    Little Rock, KS
    MS-Off Ver
    2007
    Posts
    9

    sumproduct subtotal offset with multiple criteria

    I'm trying to modify my formula to add if a current cell in Column G isn't equal to the preceding cell in Column G as well.... In other words adding in multiple criteria statement. Anybody know how to add this to my formula?
    Right now as you can tell from my formula, column L is my summing column. My formula works great, but I wanted to make it a little more robust.

    Thanks,

    Renee

    '=SUMPRODUCT(SUBTOTAL(109,OFFSET($L10,ROW($L10:$L108)-ROW(L10),,1)),--($R10:$R108=0))
    Last edited by reneevic; 05-31-2016 at 05:56 PM. Reason: Solved

  2. #2
    Valued Forum Contributor loginjmor's Avatar
    Join Date
    01-31-2013
    Location
    Cedar Rapids, Iowa
    MS-Off Ver
    Excel 2013
    Posts
    1,073

    Re: sumproduct subtotal offset with multiple criteria

    Hi -

    Have you tried something like:

    =SUMPRODUCT(SUBTOTAL(109,OFFSET($L10,ROW($L10:$L108)-ROW(L10),,1)),--($R10:$R108=0)*($G11:$G108<>$G10:G107))

    I don't have time to test this, and it may choke on the fact the G arrays might not be the same length as the R and L arrays. You might have to tweak it to be something like ($G11:$G109<>$G10:G108)
    ____________________________________________
    If this has solved your problem, please edit the thread title to add the word [SOLVED] at the beginning. You can do this by
    -Go to the top of the first post
    -Select Thread Tools
    -Select Mark thread as Solved

    If I have been particularly helpful, please "bump" my reputation by pressing the small star in the lower left corner of my post.

  3. #3
    Registered User
    Join Date
    11-07-2014
    Location
    Little Rock, KS
    MS-Off Ver
    2007
    Posts
    9

    Re: sumproduct subtotal offset with multiple criteria

    I tried your idea and this doesn't appear to work. I think I understand what you're saying, but it doesn't calculate on my data.

    Thanks for the attempt.

  4. #4
    Valued Forum Contributor loginjmor's Avatar
    Join Date
    01-31-2013
    Location
    Cedar Rapids, Iowa
    MS-Off Ver
    Excel 2013
    Posts
    1,073

    Re: sumproduct subtotal offset with multiple criteria

    Hi -

    Would it be possible to upload a sample spreadsheet?

  5. #5
    Registered User
    Join Date
    11-07-2014
    Location
    Little Rock, KS
    MS-Off Ver
    2007
    Posts
    9

    Re: sumproduct subtotal offset with multiple criteria

    No, I'm sorry but I have information on this spreadsheet that can't be shared. Thanks anyway for your help.

  6. #6
    Valued Forum Contributor loginjmor's Avatar
    Join Date
    01-31-2013
    Location
    Cedar Rapids, Iowa
    MS-Off Ver
    Excel 2013
    Posts
    1,073

    Re: sumproduct subtotal offset with multiple criteria

    OK - One last try - This one works on a set of sample data that I put together.

    =SUMPRODUCT(SUBTOTAL(109,OFFSET($L10,ROW($L10:$L108)-ROW(L10),,1)),--($R10:$R108=0)*($G11:G109<>$G10:G108))

    This formula should work. Can you look at the sample data and tell me how it's different that what you are trying to do?
    Attached Files Attached Files

  7. #7
    Registered User
    Join Date
    11-07-2014
    Location
    Little Rock, KS
    MS-Off Ver
    2007
    Posts
    9

    Re: sumproduct subtotal offset with multiple criteria

    The only difference I see is that my G column is made of text data (not general). Other than that you look to be doing the same thing as me. I'm only getting an #N/A answer.

  8. #8
    Registered User
    Join Date
    11-07-2014
    Location
    Little Rock, KS
    MS-Off Ver
    2007
    Posts
    9

    Re: sumproduct subtotal offset with multiple criteria

    Okay....I got it to work. Thanks for your help Loginjmor. I'm now going to test my results to see if there any more problems.

    Thanks Again.

  9. #9
    Valued Forum Contributor loginjmor's Avatar
    Join Date
    01-31-2013
    Location
    Cedar Rapids, Iowa
    MS-Off Ver
    Excel 2013
    Posts
    1,073

    Re: sumproduct subtotal offset with multiple criteria

    OK - Great! If you are satisfied with the outcome, please edit the thread title of this post to include SOLVED per the instructions at the bottom of this post.

  10. #10
    Registered User
    Join Date
    11-07-2014
    Location
    Little Rock, KS
    MS-Off Ver
    2007
    Posts
    9

    Re: sumproduct subtotal offset with multiple criteria

    I don't think I can edit the title. It says I don't have rights....is there a secret?

    I can only mark as solved and I did.

  11. #11
    Registered User
    Join Date
    05-16-2014
    Location
    Pembroke, Malta
    MS-Off Ver
    Microsoft excel for Office 365 MSO (16.11727.20222) 32-bit
    Posts
    27

    Re: sumproduct subtotal offset with multiple criteria

    Quote Originally Posted by loginjmor View Post
    OK - One last try - This one works on a set of sample data that I put together.

    =SUMPRODUCT(SUBTOTAL(109,OFFSET($L10,ROW($L10:$L108)-ROW(L10),,1)),--($R10:$R108=0)*($G11:G109<>$G10:G108))

    This formula should work. Can you look at the sample data and tell me how it's different that what you are trying to do?

    Not sure if there any updates on such formula, but your formula works great I added 2 more criterias, thanks & well done.

+ 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. [SOLVED] how to use VBA to write " SUMPRODUCT(SUBTOTAL(3,OFFSET"....
    By austin123456 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 05-23-2016, 06:05 AM
  2. Replies: 5
    Last Post: 02-06-2015, 08:44 PM
  3. [SOLVED] SUMPRODUCT*OFFSET with Multiple Ifs??
    By pncarlson in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 03-06-2014, 08:37 PM
  4. [SOLVED] Sumproduct, Subtotal with multiple condition
    By ravi.jalani in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 09-01-2013, 12:18 PM
  5. Extract data using offset & multiple vlookup (sumproduct)
    By Navin Agrawal in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 08-30-2013, 08:34 AM
  6. Replies: 5
    Last Post: 04-20-2012, 08:54 AM
  7. subtotal - multiple criteria
    By mdma in forum Excel Formulas & Functions
    Replies: 102
    Last Post: 09-06-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