Consulting

Results 1 to 7 of 7

Thread: Sumif & sum only positive or negative number

  1. #1

    Sumif & sum only positive or negative number

    I m trying using sumif() only positive nuber which satisfied given citerion, but im getting result "0". CAn anybody help me. Formula i have entered is "=sumif(A1:A100,A110&>0,B1:100)".

    Here i m first trying to sum all cells in ranges which is equal to cell A110 & greater than zero, but i got only donuts??
    A mighty flame followeth a tiny sparkle!!



  2. #2
    Distinguished Lord of VBAX VBAX Grand Master Bob Phillips's Avatar
    Joined
    Apr 2005
    Posts
    25,453
    Location
    =SUMPRODUCT(--(A1:A100=A110),--(B1:B100>0),B1:B100)

  3. #3
    Quote Originally Posted by xld
    =SUMPRODUCT(--(A1:A100=A110),--(B1:B100>0),B1:B100)
    I have found this formula =SUMPRODUCT[A1:A100, (A1:A100>0)*(B1:B100=A169)] it is workin

    Can you explain me yr formula step by step. it is very short. IS it possible to combining sumif() fn with other??
    A mighty flame followeth a tiny sparkle!!



  4. #4
    Moderator VBAX Wizard Aussiebear's Avatar
    Joined
    Dec 2005
    Location
    Queensland
    Posts
    5,059
    Location
    Hi Excelliot,

    In your initial post you appear to be trying to sumif two different arrays. Bob has suggested that you use the SUMPRODUCT procedure to do so.

    Quote Originally Posted by xld
    =SUMPRODUCT(--(A1:A100=A110),--(B1:B100>0),B1:B100)
    Your first array is A1:A100 = A110 and the second being B1:B100>0. By using Sumproduct you can use up to 255 arrays in the formula.

    Please refer to the help file of Excel for an example of how this is completed.

    Ted
    Remember To Do the Following....
    Use [Code].... [/Code] tags when posting code to the thread.
    Mark your thread as Solved if satisfied by using the Thread Tools options.
    If posting the same issue to another forum please show the link

  5. #5
    what is use of "--" (that two dashes) in that 4mula
    A mighty flame followeth a tiny sparkle!!



  6. #6
    I think -- sign indicates that this is dependent condition??
    A mighty flame followeth a tiny sparkle!!



  7. #7
    Distinguished Lord of VBAX VBAX Grand Master Bob Phillips's Avatar
    Joined
    Apr 2005
    Posts
    25,453
    Location
    Quote Originally Posted by excelliot
    I think -- sign indicates that this is dependent condition??
    See http://xldynamic.com/source/xld.SUMPRODUCT.html

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •