+ Reply to Thread
Results 1 to 2 of 2

change plus/minus inside a sumproduct function

  1. #1
    Registered User
    Join Date
    09-27-2006
    Posts
    5

    change plus/minus inside a sumproduct function

    =SUMPRODUCT((YEAR(A2:A351)>=2000)*(J2:J351<-0,4)*(H2:H351>J2:J351)*(H2:H351-J2:J351))

    A2:A351--------------- H2:H351------J2:J351
    18.sept.06------------- -0,6 ------ -2
    15.okt.05-------------- 2 ------ -1
    10.okt.05-------------- -0,4 ------ -2
    08.okt.05-------------- -0,1 ------ -0,5
    06.apr.04-------------- 3 ------ -3
    03.apr.02-------------- -1,5 ------ -2

    now this formula doesnt count like i want.
    this forumla checks if the year is > 2000 and if the number in j < -0,4 and if the number in h > j. If it is like this i want to get the result.
    BUt in this case there occurs a problem.
    18.sept should be = 1,4
    15okt. = 3
    10 Okt =1,6
    08okt = 0,4
    06 okt =6
    3 apr =0,5
    This problem occurs because of the leading sign and i dont know how to elimate this.

    Greetings

  2. #2
    Forum Contributor
    Join Date
    03-13-2005
    Posts
    6,195
    Quote Originally Posted by orang
    =SUMPRODUCT((YEAR(A2:A351)>=2000)*(J2:J351<-0,4)*(H2:H351>J2:J351)*(H2:H351-J2:J351))

    A2:A351--------------- H2:H351------J2:J351
    18.sept.06------------- -0,6 ------ -2
    15.okt.05-------------- 2 ------ -1
    10.okt.05-------------- -0,4 ------ -2
    08.okt.05-------------- -0,1 ------ -0,5
    06.apr.04-------------- 3 ------ -3
    03.apr.02-------------- -1,5 ------ -2

    now this formula doesnt count like i want.
    this forumla checks if the year is > 2000 and if the number in j < -0,4 and if the number in h > j. If it is like this i want to get the result.
    BUt in this case there occurs a problem.
    18.sept should be = 1,4
    15okt. = 3
    10 Okt =1,6
    08okt = 0,4
    06 okt =6
    3 apr =0,5
    This problem occurs because of the leading sign and i dont know how to elimate this.

    Greetings
    How about a spare (helper) column (or two) that has something like =If(H1<0,H1*-1,H1) and use that in your SumProduct, . . or, if the formula in H1 could set itsself positive ?

    ---

+ 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