+ Reply to Thread
Results 1 to 6 of 6

Sumproduct

Hybrid View

  1. #1
    Registered User
    Join Date
    03-30-2011
    Location
    London, England
    MS-Off Ver
    Excel 2003
    Posts
    90

    Sumproduct

    Hello.

    I have the following formula:

    =SUMPRODUCT(('Retailer1!$K$2:$K$2263=CONCATENATE(A5,"LY"))*('Retailer1'!$L$2:$L$2263<>0))

    And I want it to give me the number of times the number changes from 0 to a rather than counting all the values higher than 0.

    Can anyone helpme?
    Last edited by este994; 04-21-2011 at 05:43 AM.

  2. #2
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: Sumproduct

    what do you mean by "changes from 0" that as it stands counts + and -ve nos
    "Unless otherwise stated all my comments are directed at OP"

    Mojito connoisseur and now happily retired
    where does code go ?
    look here
    how to insert code

    how to enter array formula

    why use -- in sumproduct
    recommended reading
    wiki Mojito

    how to say no convincingly

    most important thing you need
    Martin Wilson: SPV
    and RSMBC

  3. #3
    Registered User
    Join Date
    03-30-2011
    Location
    London, England
    MS-Off Ver
    Excel 2003
    Posts
    90

    Re: Sumproduct

    Yea, but what I want my result to show is the amount of times (in the given range L) the values change from 0 to 1.

    my range looks liek this:
    0
    0
    0
    0
    0
    0
    1
    1
    1
    1
    0
    0
    0
    1
    1
    1
    1
    0
    0
    0
    1
    1
    1

    So in this case I would want the answer to be 3. Does that make sense?

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

    Re: Sumproduct

    Do you still want to take into account the column K condition? Try like this

    =SUMPRODUCT(('Retailer1!$K$2:$K$2262=CONCATENATE(A5,"LY"))*('Retailer1'!$L$2:$L$2262=0)*('Retailer1!$K$3:$K$2263=CONCATENATE(A5,"LY"))*('Retailer1'!$L$3:$L$2263=1))

    Notice that for the third and fourth conditions the ranges need to be "offset" by 1
    Audere est facere

  5. #5
    Registered User
    Join Date
    03-30-2011
    Location
    London, England
    MS-Off Ver
    Excel 2003
    Posts
    90

    Re: Sumproduct

    Thank you. But unfortunately the result comes up with 0... any ideas?

  6. #6
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: Sumproduct

    =SUMPRODUCT(--(FREQUENCY(IF(A1:A24=0,ROW(A1:A24)),IF(A1:A24<>0,ROW(A1:A24)))>0)) array entered will give the number of blocks of zeros

+ 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