+ Reply to Thread
Results 1 to 5 of 5

Problem with sumproduct

Hybrid View

  1. #1
    Registered User
    Join Date
    08-04-2008
    Location
    Los Angeles, CA
    Posts
    33

    Problem with sumproduct

    In my spreadsheet, I used the formula in below , and the return amount is off. I am thinking it might be picking up other criteria as well. the formula that is use is as follow:

    =(SUMPRODUCT(ISNUMBER(SEARCH("Ridgecrest * tier 1",$M$2:$M$65536))*($Y$2:$Y$65536=$AG76)*($O$2:$O$65536<1978)*($P$2:$P$65536="Single Family"),$Q$2:$Q$65536))/1000

    I am thinking that the ISNUMBER(SEARCH("Ridgecrest * tier 1") is picking up the "Ridgecrest * tier 1+". How would I be able to have the excel just pick the ridgecrest tier 1 only? Thanks

  2. #2
    Forum Expert Ron Coderre's Avatar
    Join Date
    03-22-2005
    Location
    Boston, Massachusetts
    MS-Off Ver
    2013, 2016, O365
    Posts
    6,996

    Problem with sumproduct

    It might be a simple as adding a space to your criteria and the cells being tested.

    Try this:
    =(SUMPRODUCT(ISNUMBER(SEARCH("Ridgecrest * tier 1 ",$M$2:$M$65536&" "))*
    ($Y$2:$Y$65536=$AG76)*($O$2:$O$65536<1978)*($P$2:$P$65536="Single Family"),
    $Q$2:$Q$65536))/1000
    Does that work?
    Ron
    Former Microsoft MVP - Excel (2006 - 2015)
    Click here to see the Forum Rules

  3. #3
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    Microsoft 365
    Posts
    14,702
    What sort of entries do you have in column M? Do these actually contain asterisks like * or are you using that as a "wildcard"?

    SEARCH function treats * as a wildcard so it would also count any entry like "Ridgecrest xyzxyz tier 1". If you're looking for a literal asterisk then precede with a ~, i.e.

    "Ridgecrest ~* tier 1 "

  4. #4
    Registered User
    Join Date
    08-04-2008
    Location
    Los Angeles, CA
    Posts
    33
    Please let me be more clear on my question. The problem I am having right now is my sumproduct is picking up unnecessary items. When I run use pivot table with the same criteria, the number that I got doesn't match with the sumproduct.


    My formula has included 2 similar criterira because the N column has 2 different type of 1 tier that I would want to pick out. (1. "Ducted Evaporative * 1 tier" and 2. "Ducted Evaporative * X-1 Tier") Can I combine the 2 into one sumproduct?

    =(SUMPRODUCT(ISNUMBER(SEARCH("Ducted Evaporative * 1 tier",$N$2:$N$65536))*($Y$2:$Y$65536=$AG75)*($O$2:$O$65536<1978)*($P$2:$P$65536="Single Family"),$Q$2:$Q$65536))/1000+((SUMPRODUCT(ISNUMBER(SEARCH("Ducted Evaporative * X-1 tier *",$N$2:$N$65536))*($Y$2:$Y$65536=$AG75)*($O$2:$O$65536<1978)*($P$2:$P$65536="Single Family"),$Q$2:$Q$65536))/1000)

    The 2 measures that I would like the sumproduct to pick out from column N are:
    1) Ducted Evaporative Cooler Single Stage 1 Tier ADOBE ....
    2) Ducted Evaporative Cooler Single Stage X-1 Tier ....
    Last edited by siulonbow; 08-18-2008 at 05:11 PM.

  5. #5
    Forum Expert
    Join Date
    12-24-2004
    Location
    Sweden
    Posts
    1,256

    ...

    You could add: &" " or &A1 where you put " "
    SEARCH("Ridgecrest * tier 1"&" ",$M$2:$M$65536&" ")
    HTH
    Ola


    ...I see Ron's and my suggestions are excactly alike...might be worth something.
    Last edited by olasa; 08-15-2008 at 09:29 PM.

+ 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