+ Reply to Thread
Results 1 to 7 of 7

sum product if three fields are true

Hybrid View

  1. #1
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: sum product if three fields are true

    Given the size of the matrix - pre XL2007 you should really add a key to Errors sheet, eg:

    Errors!L2:
    ="@"&A2&"@"&B2&"@"&I2&"@"
    copied down for all rows
    You can then use COUNTIF which is efficient whereas your alternatives are not.

    Production!C6
    =COUNTIF(Errors!$L:$L,"@"&$B6&"@"&LOOKUP(REPT("Z",255),$C$2:C$2)&"@"&C$3&"@")
    applied to matrices
    In XL2010 (as in XL2007) you could use COUNTIFS to negate need for Key

    Without the key you are left with Arrays and/or SUMPRODUCT which are inefficient and should not be used in large quantity (as would be the case here) - assuming performance is of interest.

  2. #2
    Forum Contributor 00Able's Avatar
    Join Date
    11-17-2010
    Location
    Pittsburgh, PA
    MS-Off Ver
    Excel 2003, 2007, 2010
    Posts
    244

    Re: sum product if three fields are true

    Thanks for your assistance day92, appreciate it.


    Quote Originally Posted by DonkeyOte View Post
    Without the key you are left with Arrays and/or SUMPRODUCT which are inefficient and should not be used in large quantity (as would be the case here) - assuming performance is of interest.
    You really are a smart cookie, I aspire to pick up this knowledge...performance is always of interest and I am afraid that is one aspect that I do not fully understand...volatile excel functions...someday I'm hoping I will
    Last edited by 00Able; 01-12-2011 at 07:29 PM.
    Providing Problems for Your Solutions
    STARS are my Punching Bag, You will be rewarded.

    In the rare event that I may help you, feel free to make me see STARS

  3. #3
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: sum product if three fields are true

    Quote Originally Posted by 00Able
    I aspire to pick up this knowledge
    I'd draw your attention to the below:

    Quote Originally Posted by Rita Mae Brown
    Good judgment comes from experience, and often experience comes from bad judgment
    That's how most people learn that SUMPRODUCTs & Arrays are bad news when used in large quantity and/or with large precedent ranges and/or in Volatile manner.

    Quote Originally Posted by 00Able
    performance is always of interest and I am afraid that is one aspect that I do not fully understand...volatile excel functions...someday I'm hoping I will
    Check out the Volatility link in my sig. - and in fact read through the whole site in full - it's the best resource on Excel performance & optimisation re: calculation engine etc...
    (the author Charles Williams is an MS Excel MVP and has written white papers for them on the same subject - covering a lot of the same material)

+ 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