+ Reply to Thread
Results 1 to 4 of 4

Sumproduct Multiple Data

  1. #1
    Registered User
    Join Date
    09-21-2009
    Location
    uk
    MS-Off Ver
    Excel 2003
    Posts
    4

    Sumproduct Multiple Data

    Hi All

    I have a Sumproduct Formula as below

    =SUMPRODUCT(--(Data!$E$2:$E$65536=Sheet1!$A2),--(Data!$H$2:$H$65536="Cancellation, Property Damage & Liability") --(Data!$F$2:$F$65536=B$1),1*ISTEXT(Data!$A$2:$A$65536))

    Where i am looking at "Cancellation, Property Damage & Liability" i want to be able to add other text fields to this section from the same data range to include multiple tect field selections

    Is this possible?

    Many thanks

    jay_b

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

    Re: Sumproduct Multiple Data

    Hi,

    you can incorporate an OR() style check into sumproduct thus:

    =SUMPRODUCT(--(Data!$E$2:$E$65536=Sheet1!$A2),--((Data!$H$2:$H$65536="Cancellation, Property Damage & Liability")+(Data!$H$2:$H$65536="Other text")+(Data!$H$2:$H$65536="still other text")), --(Data!$F$2:$F$65536=B$1),1*ISTEXT(Data!$A$2:$A$65536))


    this will generate three arrays of TRUE and FALSE which are added, so TRUE+FALSE+FALSE = TRUE, which means, the value will be included.


    hth

  3. #3
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    Microsoft 365
    Posts
    14,736

    Re: Sumproduct Multiple Data

    Another way would be to list all the text strings that you need to check against somewhere on the worksheet, e.g. C1:C10, then change this part

    --(Data!$H$2:$H$65536="Cancellation, Property Damage & Liability")

    to this

    --ISNUMBER(MATCH(Data!$H$2:$H$65536,C1:C10,0))

    Note: unless you really have 65000 rows of data it would be better to restrict the range to a smaller size

  4. #4
    Registered User
    Join Date
    09-21-2009
    Location
    uk
    MS-Off Ver
    Excel 2003
    Posts
    4

    Re: Sumproduct Multiple Data

    Many thanks Teylyn and daddylonglegs

    Much appreciated

+ 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