+ Reply to Thread
Results 1 to 89 of 89

SumIf function

  1. #1
    Duke Carey
    Guest

    Re: SumIf function

    Then add one more column that sums across the row, then use one of Bob's
    SUMIF() functions and reference the new column

    "nc" wrote:

    > Thanks Bob.
    >
    > I have about 10 columns. I was looking for a symplified function.
    >
    > "Bob Phillips" wrote:
    >
    > > =sumif(A2:A20="Income"),B2:B20)+sumif(A2:A20="Income"),C2:C20)
    > >
    > > --
    > >
    > > HTH
    > >
    > > RP
    > > (remove nothere from the email address if mailing direct)
    > >
    > >
    > > "nc" <[email protected]> wrote in message
    > > news:[email protected]...
    > > > EENF EPDA EKHC GGEN
    > > > Expenditure 1 2 3 4
    > > > Income 2 2 2 6
    > > > Capital additions 5 2 4 5
    > > > Income 7 8 9 5
    > > > Capital additions 10 11 12 11
    > > >
    > > > How can I total the more than one column if the criteria is "Income"?

    > >
    > >
    > >


  2. #2
    nc
    Guest

    Re: SumIf function

    Thanks Domenic.

    Can this function be adapted to use more than one criteria.

    "Domenic" wrote:

    > Try...
    >
    > =SUMPRODUCT((A2:A6="Income")*(B2:E6))
    >
    > Adjust the range accordingly.
    >
    > Hope this helps!
    >
    > In article <[email protected]>,
    > "nc" <[email protected]> wrote:
    >
    > > EENF EPDA EKHC GGEN
    > > Expenditure 1 2 3 4
    > > Income 2 2 2 6
    > > Capital additions 5 2 4 5
    > > Income 7 8 9 5
    > > Capital additions 10 11 12 11
    > >
    > > How can I total the more than one column if the criteria is "Income"?

    >


  3. #3
    Domenic
    Guest

    Re: SumIf function

    Try...

    =SUMPRODUCT((A2:A6="Income")*(B2:E6))

    Adjust the range accordingly.

    Hope this helps!

    In article <[email protected]>,
    "nc" <[email protected]> wrote:

    > EENF EPDA EKHC GGEN
    > Expenditure 1 2 3 4
    > Income 2 2 2 6
    > Capital additions 5 2 4 5
    > Income 7 8 9 5
    > Capital additions 10 11 12 11
    >
    > How can I total the more than one column if the criteria is "Income"?


  4. #4
    Domenic
    Guest

    Re: SumIf function

    Sure...

    =SUMPRODUCT((RangeA="Criterion")*(RangeB="Criterion")*(RangeC="Criterion"
    )*(RangeToSum))

    Remove the quotes if your criterion is a numerical value.

    Hope this helps!

    In article <[email protected]>,
    "nc" <[email protected]> wrote:

    > Thanks Domenic.
    >
    > Can this function be adapted to use more than one criteria.


  5. #5
    Harlan Grove
    Guest

    Re: SumIf function

    Domenic wrote...
    >Sure...
    >
    >=SUMPRODUCT((RangeA="Criterion")*(RangeB="Criterion")
    >*(RangeC="Criterion")*(RangeToSum))

    ....

    I'm not an absolutist about using separate arguments for all criteria
    arguments, but the value array should be a separate argument in
    conditional sums (as opposed to conditional counts), i.e.,

    =SUMPRODUCT((RangeA="Criterion")*(RangeB="Criterion")
    *(RangeC="Criterion"),RangeToSum)

    because SUMPRODUCT will ignore entries in RangeToSum that aren't
    numeric and can't be converted to numeric *IF* RangeToSum were a
    separate argument. In that situation, your formula would return
    #VALUE!.


  6. #6
    Bob Phillips
    Guest

    Re: SumIf function

    Here is a formula with a few columns, add the rest

    =SUMPRODUCT(--(A2:A20="Income"),B2:B20+C2:C20+D2:D20)

    --

    HTH

    RP
    (remove nothere from the email address if mailing direct)


    "nc" <[email protected]> wrote in message
    news:[email protected]...
    > Thanks Bob.
    >
    > I have about 10 columns. I was looking for a symplified function.
    >
    > "Bob Phillips" wrote:
    >
    > > =sumif(A2:A20="Income"),B2:B20)+sumif(A2:A20="Income"),C2:C20)
    > >
    > > --
    > >
    > > HTH
    > >
    > > RP
    > > (remove nothere from the email address if mailing direct)
    > >
    > >
    > > "nc" <[email protected]> wrote in message
    > > news:[email protected]...
    > > > EENF EPDA EKHC GGEN
    > > > Expenditure 1 2 3 4
    > > > Income 2 2 2 6
    > > > Capital additions 5 2 4 5
    > > > Income 7 8 9 5
    > > > Capital additions 10 11 12 11
    > > >
    > > > How can I total the more than one column if the criteria is "Income"?

    > >
    > >
    > >




  7. #7
    Domenic
    Guest

    Re: SumIf function

    Thanks Harlan! The reason I didn't use a separate argument here is that
    the range actually spans a number of columns. I should have made that
    clear...

    Thanks again, Harlan!

    In article <[email protected]>,
    "Harlan Grove" <[email protected]> wrote:

    > Domenic wrote...
    > >Sure...
    > >
    > >=SUMPRODUCT((RangeA="Criterion")*(RangeB="Criterion")
    > >*(RangeC="Criterion")*(RangeToSum))

    > ...
    >
    > I'm not an absolutist about using separate arguments for all criteria
    > arguments, but the value array should be a separate argument in
    > conditional sums (as opposed to conditional counts), i.e.,
    >
    > =SUMPRODUCT((RangeA="Criterion")*(RangeB="Criterion")
    > *(RangeC="Criterion"),RangeToSum)
    >
    > because SUMPRODUCT will ignore entries in RangeToSum that aren't
    > numeric and can't be converted to numeric *IF* RangeToSum were a
    > separate argument. In that situation, your formula would return
    > #VALUE!.


  8. #8
    RagDyer
    Guest

    Re: SumIf function

    But in some (many) situations, that error return would be a welcomed trap,
    denoting contaminated data.
    --
    Regards,

    RD

    ---------------------------------------------------------------------------
    Please keep all correspondence within the NewsGroup, so all may benefit !
    ---------------------------------------------------------------------------

    "Harlan Grove" <[email protected]> wrote in message
    news:[email protected]...
    > Domenic wrote...
    > >Sure...
    > >
    > >=SUMPRODUCT((RangeA="Criterion")*(RangeB="Criterion")
    > >*(RangeC="Criterion")*(RangeToSum))

    > ...
    >
    > I'm not an absolutist about using separate arguments for all criteria
    > arguments, but the value array should be a separate argument in
    > conditional sums (as opposed to conditional counts), i.e.,
    >
    > =SUMPRODUCT((RangeA="Criterion")*(RangeB="Criterion")
    > *(RangeC="Criterion"),RangeToSum)
    >
    > because SUMPRODUCT will ignore entries in RangeToSum that aren't
    > numeric and can't be converted to numeric *IF* RangeToSum were a
    > separate argument. In that situation, your formula would return
    > #VALUE!.
    >



  9. #9
    Domenic
    Guest

    Re: SumIf function

    Very true...

    In article <[email protected]>,
    "RagDyer" <[email protected]> wrote:

    > But in some (many) situations, that error return would be a welcomed trap,
    > denoting contaminated data.
    > --
    > Regards,
    >
    > RD
    >
    > ---------------------------------------------------------------------------
    > Please keep all correspondence within the NewsGroup, so all may benefit !
    > ---------------------------------------------------------------------------
    >
    > "Harlan Grove" <[email protected]> wrote in message
    > news:[email protected]...
    > > Domenic wrote...
    > > >Sure...
    > > >
    > > >=SUMPRODUCT((RangeA="Criterion")*(RangeB="Criterion")
    > > >*(RangeC="Criterion")*(RangeToSum))

    > > ...
    > >
    > > I'm not an absolutist about using separate arguments for all criteria
    > > arguments, but the value array should be a separate argument in
    > > conditional sums (as opposed to conditional counts), i.e.,
    > >
    > > =SUMPRODUCT((RangeA="Criterion")*(RangeB="Criterion")
    > > *(RangeC="Criterion"),RangeToSum)
    > >
    > > because SUMPRODUCT will ignore entries in RangeToSum that aren't
    > > numeric and can't be converted to numeric *IF* RangeToSum were a
    > > separate argument. In that situation, your formula would return
    > > #VALUE!.
    > >


  10. #10
    nc
    Guest

    Re: SumIf function

    Thanks Bob.

    I have about 10 columns. I was looking for a symplified function.

    "Bob Phillips" wrote:

    > =sumif(A2:A20="Income"),B2:B20)+sumif(A2:A20="Income"),C2:C20)
    >
    > --
    >
    > HTH
    >
    > RP
    > (remove nothere from the email address if mailing direct)
    >
    >
    > "nc" <[email protected]> wrote in message
    > news:[email protected]...
    > > EENF EPDA EKHC GGEN
    > > Expenditure 1 2 3 4
    > > Income 2 2 2 6
    > > Capital additions 5 2 4 5
    > > Income 7 8 9 5
    > > Capital additions 10 11 12 11
    > >
    > > How can I total the more than one column if the criteria is "Income"?

    >
    >
    >


  11. #11
    nc
    Guest

    Re: SumIf function

    Hi Domenic

    I tried using the following function,

    =SUMPRODUCT((A2:A6="Dividend")*(A2:A6="Interest")*(B2:D6)) with the table
    below and I get a value of zero. I was expecting 1200.

    Jan Feb March
    Dividend 100 100 100
    Interest 100 100 100
    Expenses -100 -100 -100
    Dividend 100 100 100
    Interest 100 100 100


    Thanks.


    "Domenic" wrote:

    > Sure...
    >
    > =SUMPRODUCT((RangeA="Criterion")*(RangeB="Criterion")*(RangeC="Criterion"
    > )*(RangeToSum))
    >
    > Remove the quotes if your criterion is a numerical value.
    >
    > Hope this helps!
    >
    > In article <[email protected]>,
    > "nc" <[email protected]> wrote:
    >
    > > Thanks Domenic.
    > >
    > > Can this function be adapted to use more than one criteria.

    >


  12. #12
    KL
    Guest

    Re: SumIf function

    Hi,

    Try this:

    =SUMPRODUCT(((A2:A6="Dividend")+(A2:A6="Interest")>0)*(B2:D6))

    Your formula basically says sum if a cell is equal to "Dividend" AND
    "Interest" (which isn't possible) while it should say sum if a cell is equal
    to "Dividend" OR "Interest"

    Regards,
    KL


    "nc" <[email protected]> wrote in message
    news:[email protected]...
    > Hi Domenic
    >
    > I tried using the following function,
    >
    > =SUMPRODUCT((A2:A6="Dividend")*(A2:A6="Interest")*(B2:D6)) with the table
    > below and I get a value of zero. I was expecting 1200.
    >
    > Jan Feb March
    > Dividend 100 100 100
    > Interest 100 100 100
    > Expenses -100 -100 -100
    > Dividend 100 100 100
    > Interest 100 100 100
    >
    >
    > Thanks.
    >
    >
    > "Domenic" wrote:
    >
    >> Sure...
    >>
    >> =SUMPRODUCT((RangeA="Criterion")*(RangeB="Criterion")*(RangeC="Criterion"
    >> )*(RangeToSum))
    >>
    >> Remove the quotes if your criterion is a numerical value.
    >>
    >> Hope this helps!
    >>
    >> In article <[email protected]>,
    >> "nc" <[email protected]> wrote:
    >>
    >> > Thanks Domenic.
    >> >
    >> > Can this function be adapted to use more than one criteria.

    >>




  13. #13
    Domenic
    Guest

    Re: SumIf function

    Actually, the following should suffice...

    =SUMPRODUCT(((A2:A6="Dividend")+(A2:A6="Interest"))*(B2:D6))

    or

    =SUMPRODUCT(((A2:A6=F2)+(A2:A6=G2))*(B2:D6))

    ....where F2 contains your first criterion, such as Dividend, and G2
    contains your second criterion, such as Interest.

    Hope this helps!

    In article <#sYNH#[email protected]>,
    "KL" <[email protected]> wrote:

    > Hi,
    >
    > Try this:
    >
    > =SUMPRODUCT(((A2:A6="Dividend")+(A2:A6="Interest")>0)*(B2:D6))
    >
    > Your formula basically says sum if a cell is equal to "Dividend" AND
    > "Interest" (which isn't possible) while it should say sum if a cell is equal
    > to "Dividend" OR "Interest"
    >
    > Regards,
    > KL


  14. #14
    Bob Phillips
    Guest

    Re: SumIf function

    =sumif(A2:A20="Income"),B2:B20)+sumif(A2:A20="Income"),C2:C20)

    --

    HTH

    RP
    (remove nothere from the email address if mailing direct)


    "nc" <[email protected]> wrote in message
    news:[email protected]...
    > EENF EPDA EKHC GGEN
    > Expenditure 1 2 3 4
    > Income 2 2 2 6
    > Capital additions 5 2 4 5
    > Income 7 8 9 5
    > Capital additions 10 11 12 11
    >
    > How can I total the more than one column if the criteria is "Income"?




  15. #15
    Domenic
    Guest

    Re: SumIf function

    Very true...

    In article <[email protected]>,
    "RagDyer" <[email protected]> wrote:

    > But in some (many) situations, that error return would be a welcomed trap,
    > denoting contaminated data.
    > --
    > Regards,
    >
    > RD
    >
    > ---------------------------------------------------------------------------
    > Please keep all correspondence within the NewsGroup, so all may benefit !
    > ---------------------------------------------------------------------------
    >
    > "Harlan Grove" <[email protected]> wrote in message
    > news:[email protected]...
    > > Domenic wrote...
    > > >Sure...
    > > >
    > > >=SUMPRODUCT((RangeA="Criterion")*(RangeB="Criterion")
    > > >*(RangeC="Criterion")*(RangeToSum))

    > > ...
    > >
    > > I'm not an absolutist about using separate arguments for all criteria
    > > arguments, but the value array should be a separate argument in
    > > conditional sums (as opposed to conditional counts), i.e.,
    > >
    > > =SUMPRODUCT((RangeA="Criterion")*(RangeB="Criterion")
    > > *(RangeC="Criterion"),RangeToSum)
    > >
    > > because SUMPRODUCT will ignore entries in RangeToSum that aren't
    > > numeric and can't be converted to numeric *IF* RangeToSum were a
    > > separate argument. In that situation, your formula would return
    > > #VALUE!.
    > >


  16. #16
    Aladin Akyurek
    Guest

    Re: SumIf function

    Why not create an additional column, say E, that sums monthly values
    like in:

    E2, copied down:

    =SUM(B2:D2)

    which allows you to avoid expensive conditional calculations?

    nc wrote:
    > Hi Domenic
    >
    > I tried using the following function,
    >
    > =SUMPRODUCT((A2:A6="Dividend")*(A2:A6="Interest")*(B2:D6)) with the table
    > below and I get a value of zero. I was expecting 1200.
    >
    > Jan Feb March
    > Dividend 100 100 100
    > Interest 100 100 100
    > Expenses -100 -100 -100
    > Dividend 100 100 100
    > Interest 100 100 100
    >
    >
    > Thanks.
    >
    >
    > "Domenic" wrote:
    >
    >
    >>Sure...
    >>
    >>=SUMPRODUCT((RangeA="Criterion")*(RangeB="Criterion")*(RangeC="Criterion"
    >>)*(RangeToSum))
    >>
    >>Remove the quotes if your criterion is a numerical value.
    >>
    >>Hope this helps!
    >>
    >>In article <[email protected]>,
    >> "nc" <[email protected]> wrote:
    >>
    >>
    >>>Thanks Domenic.
    >>>
    >>>Can this function be adapted to use more than one criteria.

    >>


  17. #17
    nc
    Guest

    Re: SumIf function

    Hi Domenic

    I tried using the following function,

    =SUMPRODUCT((A2:A6="Dividend")*(A2:A6="Interest")*(B2:D6)) with the table
    below and I get a value of zero. I was expecting 1200.

    Jan Feb March
    Dividend 100 100 100
    Interest 100 100 100
    Expenses -100 -100 -100
    Dividend 100 100 100
    Interest 100 100 100


    Thanks.


    "Domenic" wrote:

    > Sure...
    >
    > =SUMPRODUCT((RangeA="Criterion")*(RangeB="Criterion")*(RangeC="Criterion"
    > )*(RangeToSum))
    >
    > Remove the quotes if your criterion is a numerical value.
    >
    > Hope this helps!
    >
    > In article <[email protected]>,
    > "nc" <[email protected]> wrote:
    >
    > > Thanks Domenic.
    > >
    > > Can this function be adapted to use more than one criteria.

    >


  18. #18
    RagDyer
    Guest

    Re: SumIf function

    But in some (many) situations, that error return would be a welcomed trap,
    denoting contaminated data.
    --
    Regards,

    RD

    ---------------------------------------------------------------------------
    Please keep all correspondence within the NewsGroup, so all may benefit !
    ---------------------------------------------------------------------------

    "Harlan Grove" <[email protected]> wrote in message
    news:[email protected]...
    > Domenic wrote...
    > >Sure...
    > >
    > >=SUMPRODUCT((RangeA="Criterion")*(RangeB="Criterion")
    > >*(RangeC="Criterion")*(RangeToSum))

    > ...
    >
    > I'm not an absolutist about using separate arguments for all criteria
    > arguments, but the value array should be a separate argument in
    > conditional sums (as opposed to conditional counts), i.e.,
    >
    > =SUMPRODUCT((RangeA="Criterion")*(RangeB="Criterion")
    > *(RangeC="Criterion"),RangeToSum)
    >
    > because SUMPRODUCT will ignore entries in RangeToSum that aren't
    > numeric and can't be converted to numeric *IF* RangeToSum were a
    > separate argument. In that situation, your formula would return
    > #VALUE!.
    >



  19. #19
    KL
    Guest

    Re: SumIf function

    Hi,

    Try this:

    =SUMPRODUCT(((A2:A6="Dividend")+(A2:A6="Interest")>0)*(B2:D6))

    Your formula basically says sum if a cell is equal to "Dividend" AND
    "Interest" (which isn't possible) while it should say sum if a cell is equal
    to "Dividend" OR "Interest"

    Regards,
    KL


    "nc" <[email protected]> wrote in message
    news:[email protected]...
    > Hi Domenic
    >
    > I tried using the following function,
    >
    > =SUMPRODUCT((A2:A6="Dividend")*(A2:A6="Interest")*(B2:D6)) with the table
    > below and I get a value of zero. I was expecting 1200.
    >
    > Jan Feb March
    > Dividend 100 100 100
    > Interest 100 100 100
    > Expenses -100 -100 -100
    > Dividend 100 100 100
    > Interest 100 100 100
    >
    >
    > Thanks.
    >
    >
    > "Domenic" wrote:
    >
    >> Sure...
    >>
    >> =SUMPRODUCT((RangeA="Criterion")*(RangeB="Criterion")*(RangeC="Criterion"
    >> )*(RangeToSum))
    >>
    >> Remove the quotes if your criterion is a numerical value.
    >>
    >> Hope this helps!
    >>
    >> In article <[email protected]>,
    >> "nc" <[email protected]> wrote:
    >>
    >> > Thanks Domenic.
    >> >
    >> > Can this function be adapted to use more than one criteria.

    >>




  20. #20
    Domenic
    Guest

    Re: SumIf function

    Thanks Harlan! The reason I didn't use a separate argument here is that
    the range actually spans a number of columns. I should have made that
    clear...

    Thanks again, Harlan!

    In article <[email protected]>,
    "Harlan Grove" <[email protected]> wrote:

    > Domenic wrote...
    > >Sure...
    > >
    > >=SUMPRODUCT((RangeA="Criterion")*(RangeB="Criterion")
    > >*(RangeC="Criterion")*(RangeToSum))

    > ...
    >
    > I'm not an absolutist about using separate arguments for all criteria
    > arguments, but the value array should be a separate argument in
    > conditional sums (as opposed to conditional counts), i.e.,
    >
    > =SUMPRODUCT((RangeA="Criterion")*(RangeB="Criterion")
    > *(RangeC="Criterion"),RangeToSum)
    >
    > because SUMPRODUCT will ignore entries in RangeToSum that aren't
    > numeric and can't be converted to numeric *IF* RangeToSum were a
    > separate argument. In that situation, your formula would return
    > #VALUE!.


  21. #21
    Harlan Grove
    Guest

    Re: SumIf function

    Domenic wrote...
    >Sure...
    >
    >=SUMPRODUCT((RangeA="Criterion")*(RangeB="Criterion")
    >*(RangeC="Criterion")*(RangeToSum))

    ....

    I'm not an absolutist about using separate arguments for all criteria
    arguments, but the value array should be a separate argument in
    conditional sums (as opposed to conditional counts), i.e.,

    =SUMPRODUCT((RangeA="Criterion")*(RangeB="Criterion")
    *(RangeC="Criterion"),RangeToSum)

    because SUMPRODUCT will ignore entries in RangeToSum that aren't
    numeric and can't be converted to numeric *IF* RangeToSum were a
    separate argument. In that situation, your formula would return
    #VALUE!.


  22. #22
    Domenic
    Guest

    Re: SumIf function

    Actually, the following should suffice...

    =SUMPRODUCT(((A2:A6="Dividend")+(A2:A6="Interest"))*(B2:D6))

    or

    =SUMPRODUCT(((A2:A6=F2)+(A2:A6=G2))*(B2:D6))

    ....where F2 contains your first criterion, such as Dividend, and G2
    contains your second criterion, such as Interest.

    Hope this helps!

    In article <#sYNH#[email protected]>,
    "KL" <[email protected]> wrote:

    > Hi,
    >
    > Try this:
    >
    > =SUMPRODUCT(((A2:A6="Dividend")+(A2:A6="Interest")>0)*(B2:D6))
    >
    > Your formula basically says sum if a cell is equal to "Dividend" AND
    > "Interest" (which isn't possible) while it should say sum if a cell is equal
    > to "Dividend" OR "Interest"
    >
    > Regards,
    > KL


  23. #23
    Domenic
    Guest

    Re: SumIf function

    Sure...

    =SUMPRODUCT((RangeA="Criterion")*(RangeB="Criterion")*(RangeC="Criterion"
    )*(RangeToSum))

    Remove the quotes if your criterion is a numerical value.

    Hope this helps!

    In article <[email protected]>,
    "nc" <[email protected]> wrote:

    > Thanks Domenic.
    >
    > Can this function be adapted to use more than one criteria.


  24. #24
    Domenic
    Guest

    Re: SumIf function

    Try...

    =SUMPRODUCT((A2:A6="Income")*(B2:E6))

    Adjust the range accordingly.

    Hope this helps!

    In article <[email protected]>,
    "nc" <[email protected]> wrote:

    > EENF EPDA EKHC GGEN
    > Expenditure 1 2 3 4
    > Income 2 2 2 6
    > Capital additions 5 2 4 5
    > Income 7 8 9 5
    > Capital additions 10 11 12 11
    >
    > How can I total the more than one column if the criteria is "Income"?


  25. #25
    nc
    Guest

    Re: SumIf function

    Thanks Domenic.

    Can this function be adapted to use more than one criteria.

    "Domenic" wrote:

    > Try...
    >
    > =SUMPRODUCT((A2:A6="Income")*(B2:E6))
    >
    > Adjust the range accordingly.
    >
    > Hope this helps!
    >
    > In article <[email protected]>,
    > "nc" <[email protected]> wrote:
    >
    > > EENF EPDA EKHC GGEN
    > > Expenditure 1 2 3 4
    > > Income 2 2 2 6
    > > Capital additions 5 2 4 5
    > > Income 7 8 9 5
    > > Capital additions 10 11 12 11
    > >
    > > How can I total the more than one column if the criteria is "Income"?

    >


  26. #26
    Bob Phillips
    Guest

    Re: SumIf function

    Here is a formula with a few columns, add the rest

    =SUMPRODUCT(--(A2:A20="Income"),B2:B20+C2:C20+D2:D20)

    --

    HTH

    RP
    (remove nothere from the email address if mailing direct)


    "nc" <[email protected]> wrote in message
    news:[email protected]...
    > Thanks Bob.
    >
    > I have about 10 columns. I was looking for a symplified function.
    >
    > "Bob Phillips" wrote:
    >
    > > =sumif(A2:A20="Income"),B2:B20)+sumif(A2:A20="Income"),C2:C20)
    > >
    > > --
    > >
    > > HTH
    > >
    > > RP
    > > (remove nothere from the email address if mailing direct)
    > >
    > >
    > > "nc" <[email protected]> wrote in message
    > > news:[email protected]...
    > > > EENF EPDA EKHC GGEN
    > > > Expenditure 1 2 3 4
    > > > Income 2 2 2 6
    > > > Capital additions 5 2 4 5
    > > > Income 7 8 9 5
    > > > Capital additions 10 11 12 11
    > > >
    > > > How can I total the more than one column if the criteria is "Income"?

    > >
    > >
    > >




  27. #27
    Duke Carey
    Guest

    Re: SumIf function

    Then add one more column that sums across the row, then use one of Bob's
    SUMIF() functions and reference the new column

    "nc" wrote:

    > Thanks Bob.
    >
    > I have about 10 columns. I was looking for a symplified function.
    >
    > "Bob Phillips" wrote:
    >
    > > =sumif(A2:A20="Income"),B2:B20)+sumif(A2:A20="Income"),C2:C20)
    > >
    > > --
    > >
    > > HTH
    > >
    > > RP
    > > (remove nothere from the email address if mailing direct)
    > >
    > >
    > > "nc" <[email protected]> wrote in message
    > > news:[email protected]...
    > > > EENF EPDA EKHC GGEN
    > > > Expenditure 1 2 3 4
    > > > Income 2 2 2 6
    > > > Capital additions 5 2 4 5
    > > > Income 7 8 9 5
    > > > Capital additions 10 11 12 11
    > > >
    > > > How can I total the more than one column if the criteria is "Income"?

    > >
    > >
    > >


  28. #28
    Bob Phillips
    Guest

    Re: SumIf function

    =sumif(A2:A20="Income"),B2:B20)+sumif(A2:A20="Income"),C2:C20)

    --

    HTH

    RP
    (remove nothere from the email address if mailing direct)


    "nc" <[email protected]> wrote in message
    news:[email protected]...
    > EENF EPDA EKHC GGEN
    > Expenditure 1 2 3 4
    > Income 2 2 2 6
    > Capital additions 5 2 4 5
    > Income 7 8 9 5
    > Capital additions 10 11 12 11
    >
    > How can I total the more than one column if the criteria is "Income"?




  29. #29
    nc
    Guest

    Re: SumIf function

    Thanks Bob.

    I have about 10 columns. I was looking for a symplified function.

    "Bob Phillips" wrote:

    > =sumif(A2:A20="Income"),B2:B20)+sumif(A2:A20="Income"),C2:C20)
    >
    > --
    >
    > HTH
    >
    > RP
    > (remove nothere from the email address if mailing direct)
    >
    >
    > "nc" <[email protected]> wrote in message
    > news:[email protected]...
    > > EENF EPDA EKHC GGEN
    > > Expenditure 1 2 3 4
    > > Income 2 2 2 6
    > > Capital additions 5 2 4 5
    > > Income 7 8 9 5
    > > Capital additions 10 11 12 11
    > >
    > > How can I total the more than one column if the criteria is "Income"?

    >
    >
    >


  30. #30
    Domenic
    Guest

    Re: SumIf function

    Very true...

    In article <[email protected]>,
    "RagDyer" <[email protected]> wrote:

    > But in some (many) situations, that error return would be a welcomed trap,
    > denoting contaminated data.
    > --
    > Regards,
    >
    > RD
    >
    > ---------------------------------------------------------------------------
    > Please keep all correspondence within the NewsGroup, so all may benefit !
    > ---------------------------------------------------------------------------
    >
    > "Harlan Grove" <[email protected]> wrote in message
    > news:[email protected]...
    > > Domenic wrote...
    > > >Sure...
    > > >
    > > >=SUMPRODUCT((RangeA="Criterion")*(RangeB="Criterion")
    > > >*(RangeC="Criterion")*(RangeToSum))

    > > ...
    > >
    > > I'm not an absolutist about using separate arguments for all criteria
    > > arguments, but the value array should be a separate argument in
    > > conditional sums (as opposed to conditional counts), i.e.,
    > >
    > > =SUMPRODUCT((RangeA="Criterion")*(RangeB="Criterion")
    > > *(RangeC="Criterion"),RangeToSum)
    > >
    > > because SUMPRODUCT will ignore entries in RangeToSum that aren't
    > > numeric and can't be converted to numeric *IF* RangeToSum were a
    > > separate argument. In that situation, your formula would return
    > > #VALUE!.
    > >


  31. #31
    nc
    Guest

    Re: SumIf function

    Thanks Domenic.

    Can this function be adapted to use more than one criteria.

    "Domenic" wrote:

    > Try...
    >
    > =SUMPRODUCT((A2:A6="Income")*(B2:E6))
    >
    > Adjust the range accordingly.
    >
    > Hope this helps!
    >
    > In article <[email protected]>,
    > "nc" <[email protected]> wrote:
    >
    > > EENF EPDA EKHC GGEN
    > > Expenditure 1 2 3 4
    > > Income 2 2 2 6
    > > Capital additions 5 2 4 5
    > > Income 7 8 9 5
    > > Capital additions 10 11 12 11
    > >
    > > How can I total the more than one column if the criteria is "Income"?

    >


  32. #32
    Domenic
    Guest

    Re: SumIf function

    Sure...

    =SUMPRODUCT((RangeA="Criterion")*(RangeB="Criterion")*(RangeC="Criterion"
    )*(RangeToSum))

    Remove the quotes if your criterion is a numerical value.

    Hope this helps!

    In article <[email protected]>,
    "nc" <[email protected]> wrote:

    > Thanks Domenic.
    >
    > Can this function be adapted to use more than one criteria.


  33. #33
    nc
    Guest

    Re: SumIf function

    Hi Domenic

    I tried using the following function,

    =SUMPRODUCT((A2:A6="Dividend")*(A2:A6="Interest")*(B2:D6)) with the table
    below and I get a value of zero. I was expecting 1200.

    Jan Feb March
    Dividend 100 100 100
    Interest 100 100 100
    Expenses -100 -100 -100
    Dividend 100 100 100
    Interest 100 100 100


    Thanks.


    "Domenic" wrote:

    > Sure...
    >
    > =SUMPRODUCT((RangeA="Criterion")*(RangeB="Criterion")*(RangeC="Criterion"
    > )*(RangeToSum))
    >
    > Remove the quotes if your criterion is a numerical value.
    >
    > Hope this helps!
    >
    > In article <[email protected]>,
    > "nc" <[email protected]> wrote:
    >
    > > Thanks Domenic.
    > >
    > > Can this function be adapted to use more than one criteria.

    >


  34. #34
    RagDyer
    Guest

    Re: SumIf function

    But in some (many) situations, that error return would be a welcomed trap,
    denoting contaminated data.
    --
    Regards,

    RD

    ---------------------------------------------------------------------------
    Please keep all correspondence within the NewsGroup, so all may benefit !
    ---------------------------------------------------------------------------

    "Harlan Grove" <[email protected]> wrote in message
    news:[email protected]...
    > Domenic wrote...
    > >Sure...
    > >
    > >=SUMPRODUCT((RangeA="Criterion")*(RangeB="Criterion")
    > >*(RangeC="Criterion")*(RangeToSum))

    > ...
    >
    > I'm not an absolutist about using separate arguments for all criteria
    > arguments, but the value array should be a separate argument in
    > conditional sums (as opposed to conditional counts), i.e.,
    >
    > =SUMPRODUCT((RangeA="Criterion")*(RangeB="Criterion")
    > *(RangeC="Criterion"),RangeToSum)
    >
    > because SUMPRODUCT will ignore entries in RangeToSum that aren't
    > numeric and can't be converted to numeric *IF* RangeToSum were a
    > separate argument. In that situation, your formula would return
    > #VALUE!.
    >



  35. #35
    KL
    Guest

    Re: SumIf function

    Hi,

    Try this:

    =SUMPRODUCT(((A2:A6="Dividend")+(A2:A6="Interest")>0)*(B2:D6))

    Your formula basically says sum if a cell is equal to "Dividend" AND
    "Interest" (which isn't possible) while it should say sum if a cell is equal
    to "Dividend" OR "Interest"

    Regards,
    KL


    "nc" <[email protected]> wrote in message
    news:[email protected]...
    > Hi Domenic
    >
    > I tried using the following function,
    >
    > =SUMPRODUCT((A2:A6="Dividend")*(A2:A6="Interest")*(B2:D6)) with the table
    > below and I get a value of zero. I was expecting 1200.
    >
    > Jan Feb March
    > Dividend 100 100 100
    > Interest 100 100 100
    > Expenses -100 -100 -100
    > Dividend 100 100 100
    > Interest 100 100 100
    >
    >
    > Thanks.
    >
    >
    > "Domenic" wrote:
    >
    >> Sure...
    >>
    >> =SUMPRODUCT((RangeA="Criterion")*(RangeB="Criterion")*(RangeC="Criterion"
    >> )*(RangeToSum))
    >>
    >> Remove the quotes if your criterion is a numerical value.
    >>
    >> Hope this helps!
    >>
    >> In article <[email protected]>,
    >> "nc" <[email protected]> wrote:
    >>
    >> > Thanks Domenic.
    >> >
    >> > Can this function be adapted to use more than one criteria.

    >>




  36. #36
    Domenic
    Guest

    Re: SumIf function

    Try...

    =SUMPRODUCT((A2:A6="Income")*(B2:E6))

    Adjust the range accordingly.

    Hope this helps!

    In article <[email protected]>,
    "nc" <[email protected]> wrote:

    > EENF EPDA EKHC GGEN
    > Expenditure 1 2 3 4
    > Income 2 2 2 6
    > Capital additions 5 2 4 5
    > Income 7 8 9 5
    > Capital additions 10 11 12 11
    >
    > How can I total the more than one column if the criteria is "Income"?


  37. #37
    Bob Phillips
    Guest

    Re: SumIf function

    Here is a formula with a few columns, add the rest

    =SUMPRODUCT(--(A2:A20="Income"),B2:B20+C2:C20+D2:D20)

    --

    HTH

    RP
    (remove nothere from the email address if mailing direct)


    "nc" <[email protected]> wrote in message
    news:[email protected]...
    > Thanks Bob.
    >
    > I have about 10 columns. I was looking for a symplified function.
    >
    > "Bob Phillips" wrote:
    >
    > > =sumif(A2:A20="Income"),B2:B20)+sumif(A2:A20="Income"),C2:C20)
    > >
    > > --
    > >
    > > HTH
    > >
    > > RP
    > > (remove nothere from the email address if mailing direct)
    > >
    > >
    > > "nc" <[email protected]> wrote in message
    > > news:[email protected]...
    > > > EENF EPDA EKHC GGEN
    > > > Expenditure 1 2 3 4
    > > > Income 2 2 2 6
    > > > Capital additions 5 2 4 5
    > > > Income 7 8 9 5
    > > > Capital additions 10 11 12 11
    > > >
    > > > How can I total the more than one column if the criteria is "Income"?

    > >
    > >
    > >




  38. #38
    Duke Carey
    Guest

    Re: SumIf function

    Then add one more column that sums across the row, then use one of Bob's
    SUMIF() functions and reference the new column

    "nc" wrote:

    > Thanks Bob.
    >
    > I have about 10 columns. I was looking for a symplified function.
    >
    > "Bob Phillips" wrote:
    >
    > > =sumif(A2:A20="Income"),B2:B20)+sumif(A2:A20="Income"),C2:C20)
    > >
    > > --
    > >
    > > HTH
    > >
    > > RP
    > > (remove nothere from the email address if mailing direct)
    > >
    > >
    > > "nc" <[email protected]> wrote in message
    > > news:[email protected]...
    > > > EENF EPDA EKHC GGEN
    > > > Expenditure 1 2 3 4
    > > > Income 2 2 2 6
    > > > Capital additions 5 2 4 5
    > > > Income 7 8 9 5
    > > > Capital additions 10 11 12 11
    > > >
    > > > How can I total the more than one column if the criteria is "Income"?

    > >
    > >
    > >


  39. #39
    nc
    Guest

    Re: SumIf function

    Thanks Bob.

    I have about 10 columns. I was looking for a symplified function.

    "Bob Phillips" wrote:

    > =sumif(A2:A20="Income"),B2:B20)+sumif(A2:A20="Income"),C2:C20)
    >
    > --
    >
    > HTH
    >
    > RP
    > (remove nothere from the email address if mailing direct)
    >
    >
    > "nc" <[email protected]> wrote in message
    > news:[email protected]...
    > > EENF EPDA EKHC GGEN
    > > Expenditure 1 2 3 4
    > > Income 2 2 2 6
    > > Capital additions 5 2 4 5
    > > Income 7 8 9 5
    > > Capital additions 10 11 12 11
    > >
    > > How can I total the more than one column if the criteria is "Income"?

    >
    >
    >


  40. #40
    Bob Phillips
    Guest

    Re: SumIf function

    =sumif(A2:A20="Income"),B2:B20)+sumif(A2:A20="Income"),C2:C20)

    --

    HTH

    RP
    (remove nothere from the email address if mailing direct)


    "nc" <[email protected]> wrote in message
    news:[email protected]...
    > EENF EPDA EKHC GGEN
    > Expenditure 1 2 3 4
    > Income 2 2 2 6
    > Capital additions 5 2 4 5
    > Income 7 8 9 5
    > Capital additions 10 11 12 11
    >
    > How can I total the more than one column if the criteria is "Income"?




  41. #41
    Domenic
    Guest

    Re: SumIf function

    Actually, the following should suffice...

    =SUMPRODUCT(((A2:A6="Dividend")+(A2:A6="Interest"))*(B2:D6))

    or

    =SUMPRODUCT(((A2:A6=F2)+(A2:A6=G2))*(B2:D6))

    ....where F2 contains your first criterion, such as Dividend, and G2
    contains your second criterion, such as Interest.

    Hope this helps!

    In article <#sYNH#[email protected]>,
    "KL" <[email protected]> wrote:

    > Hi,
    >
    > Try this:
    >
    > =SUMPRODUCT(((A2:A6="Dividend")+(A2:A6="Interest")>0)*(B2:D6))
    >
    > Your formula basically says sum if a cell is equal to "Dividend" AND
    > "Interest" (which isn't possible) while it should say sum if a cell is equal
    > to "Dividend" OR "Interest"
    >
    > Regards,
    > KL


  42. #42
    Harlan Grove
    Guest

    Re: SumIf function

    Domenic wrote...
    >Sure...
    >
    >=SUMPRODUCT((RangeA="Criterion")*(RangeB="Criterion")
    >*(RangeC="Criterion")*(RangeToSum))

    ....

    I'm not an absolutist about using separate arguments for all criteria
    arguments, but the value array should be a separate argument in
    conditional sums (as opposed to conditional counts), i.e.,

    =SUMPRODUCT((RangeA="Criterion")*(RangeB="Criterion")
    *(RangeC="Criterion"),RangeToSum)

    because SUMPRODUCT will ignore entries in RangeToSum that aren't
    numeric and can't be converted to numeric *IF* RangeToSum were a
    separate argument. In that situation, your formula would return
    #VALUE!.


  43. #43
    Domenic
    Guest

    Re: SumIf function

    Thanks Harlan! The reason I didn't use a separate argument here is that
    the range actually spans a number of columns. I should have made that
    clear...

    Thanks again, Harlan!

    In article <[email protected]>,
    "Harlan Grove" <[email protected]> wrote:

    > Domenic wrote...
    > >Sure...
    > >
    > >=SUMPRODUCT((RangeA="Criterion")*(RangeB="Criterion")
    > >*(RangeC="Criterion")*(RangeToSum))

    > ...
    >
    > I'm not an absolutist about using separate arguments for all criteria
    > arguments, but the value array should be a separate argument in
    > conditional sums (as opposed to conditional counts), i.e.,
    >
    > =SUMPRODUCT((RangeA="Criterion")*(RangeB="Criterion")
    > *(RangeC="Criterion"),RangeToSum)
    >
    > because SUMPRODUCT will ignore entries in RangeToSum that aren't
    > numeric and can't be converted to numeric *IF* RangeToSum were a
    > separate argument. In that situation, your formula would return
    > #VALUE!.


  44. #44
    Aladin Akyurek
    Guest

    Re: SumIf function

    Why not create an additional column, say E, that sums monthly values
    like in:

    E2, copied down:

    =SUM(B2:D2)

    which allows you to avoid expensive conditional calculations?

    nc wrote:
    > Hi Domenic
    >
    > I tried using the following function,
    >
    > =SUMPRODUCT((A2:A6="Dividend")*(A2:A6="Interest")*(B2:D6)) with the table
    > below and I get a value of zero. I was expecting 1200.
    >
    > Jan Feb March
    > Dividend 100 100 100
    > Interest 100 100 100
    > Expenses -100 -100 -100
    > Dividend 100 100 100
    > Interest 100 100 100
    >
    >
    > Thanks.
    >
    >
    > "Domenic" wrote:
    >
    >
    >>Sure...
    >>
    >>=SUMPRODUCT((RangeA="Criterion")*(RangeB="Criterion")*(RangeC="Criterion"
    >>)*(RangeToSum))
    >>
    >>Remove the quotes if your criterion is a numerical value.
    >>
    >>Hope this helps!
    >>
    >>In article <[email protected]>,
    >> "nc" <[email protected]> wrote:
    >>
    >>
    >>>Thanks Domenic.
    >>>
    >>>Can this function be adapted to use more than one criteria.

    >>


  45. #45
    Domenic
    Guest

    Re: SumIf function

    Most definitely...

    In article <[email protected]>,
    Aladin Akyurek <[email protected]> wrote:

    > Why not create an additional column, say E, that sums monthly values
    > like in:
    >
    > E2, copied down:
    >
    > =SUM(B2:D2)
    >
    > which allows you to avoid expensive conditional calculations?
    >
    > nc wrote:
    > > Hi Domenic
    > >
    > > I tried using the following function,
    > >
    > > =SUMPRODUCT((A2:A6="Dividend")*(A2:A6="Interest")*(B2:D6)) with the table
    > > below and I get a value of zero. I was expecting 1200.
    > >
    > > Jan Feb March
    > > Dividend 100 100 100
    > > Interest 100 100 100
    > > Expenses -100 -100 -100
    > > Dividend 100 100 100
    > > Interest 100 100 100
    > >
    > >
    > > Thanks.
    > >
    > >
    > > "Domenic" wrote:
    > >
    > >
    > >>Sure...
    > >>
    > >>=SUMPRODUCT((RangeA="Criterion")*(RangeB="Criterion")*(RangeC="Criterion"
    > >>)*(RangeToSum))
    > >>
    > >>Remove the quotes if your criterion is a numerical value.
    > >>
    > >>Hope this helps!
    > >>
    > >>In article <[email protected]>,
    > >> "nc" <[email protected]> wrote:
    > >>
    > >>
    > >>>Thanks Domenic.
    > >>>
    > >>>Can this function be adapted to use more than one criteria.
    > >>


  46. #46
    Domenic
    Guest

    Re: SumIf function

    Actually, the following should suffice...

    =SUMPRODUCT(((A2:A6="Dividend")+(A2:A6="Interest"))*(B2:D6))

    or

    =SUMPRODUCT(((A2:A6=F2)+(A2:A6=G2))*(B2:D6))

    ....where F2 contains your first criterion, such as Dividend, and G2
    contains your second criterion, such as Interest.

    Hope this helps!

    In article <#sYNH#[email protected]>,
    "KL" <[email protected]> wrote:

    > Hi,
    >
    > Try this:
    >
    > =SUMPRODUCT(((A2:A6="Dividend")+(A2:A6="Interest")>0)*(B2:D6))
    >
    > Your formula basically says sum if a cell is equal to "Dividend" AND
    > "Interest" (which isn't possible) while it should say sum if a cell is equal
    > to "Dividend" OR "Interest"
    >
    > Regards,
    > KL


  47. #47
    nc
    Guest

    Re: SumIf function

    Hi Domenic

    I tried using the following function,

    =SUMPRODUCT((A2:A6="Dividend")*(A2:A6="Interest")*(B2:D6)) with the table
    below and I get a value of zero. I was expecting 1200.

    Jan Feb March
    Dividend 100 100 100
    Interest 100 100 100
    Expenses -100 -100 -100
    Dividend 100 100 100
    Interest 100 100 100


    Thanks.


    "Domenic" wrote:

    > Sure...
    >
    > =SUMPRODUCT((RangeA="Criterion")*(RangeB="Criterion")*(RangeC="Criterion"
    > )*(RangeToSum))
    >
    > Remove the quotes if your criterion is a numerical value.
    >
    > Hope this helps!
    >
    > In article <[email protected]>,
    > "nc" <[email protected]> wrote:
    >
    > > Thanks Domenic.
    > >
    > > Can this function be adapted to use more than one criteria.

    >


  48. #48
    Domenic
    Guest

    Re: SumIf function

    Very true...

    In article <[email protected]>,
    "RagDyer" <[email protected]> wrote:

    > But in some (many) situations, that error return would be a welcomed trap,
    > denoting contaminated data.
    > --
    > Regards,
    >
    > RD
    >
    > ---------------------------------------------------------------------------
    > Please keep all correspondence within the NewsGroup, so all may benefit !
    > ---------------------------------------------------------------------------
    >
    > "Harlan Grove" <[email protected]> wrote in message
    > news:[email protected]...
    > > Domenic wrote...
    > > >Sure...
    > > >
    > > >=SUMPRODUCT((RangeA="Criterion")*(RangeB="Criterion")
    > > >*(RangeC="Criterion")*(RangeToSum))

    > > ...
    > >
    > > I'm not an absolutist about using separate arguments for all criteria
    > > arguments, but the value array should be a separate argument in
    > > conditional sums (as opposed to conditional counts), i.e.,
    > >
    > > =SUMPRODUCT((RangeA="Criterion")*(RangeB="Criterion")
    > > *(RangeC="Criterion"),RangeToSum)
    > >
    > > because SUMPRODUCT will ignore entries in RangeToSum that aren't
    > > numeric and can't be converted to numeric *IF* RangeToSum were a
    > > separate argument. In that situation, your formula would return
    > > #VALUE!.
    > >


  49. #49
    RagDyer
    Guest

    Re: SumIf function

    But in some (many) situations, that error return would be a welcomed trap,
    denoting contaminated data.
    --
    Regards,

    RD

    ---------------------------------------------------------------------------
    Please keep all correspondence within the NewsGroup, so all may benefit !
    ---------------------------------------------------------------------------

    "Harlan Grove" <[email protected]> wrote in message
    news:[email protected]...
    > Domenic wrote...
    > >Sure...
    > >
    > >=SUMPRODUCT((RangeA="Criterion")*(RangeB="Criterion")
    > >*(RangeC="Criterion")*(RangeToSum))

    > ...
    >
    > I'm not an absolutist about using separate arguments for all criteria
    > arguments, but the value array should be a separate argument in
    > conditional sums (as opposed to conditional counts), i.e.,
    >
    > =SUMPRODUCT((RangeA="Criterion")*(RangeB="Criterion")
    > *(RangeC="Criterion"),RangeToSum)
    >
    > because SUMPRODUCT will ignore entries in RangeToSum that aren't
    > numeric and can't be converted to numeric *IF* RangeToSum were a
    > separate argument. In that situation, your formula would return
    > #VALUE!.
    >



  50. #50
    Domenic
    Guest

    Re: SumIf function

    Thanks Harlan! The reason I didn't use a separate argument here is that
    the range actually spans a number of columns. I should have made that
    clear...

    Thanks again, Harlan!

    In article <[email protected]>,
    "Harlan Grove" <[email protected]> wrote:

    > Domenic wrote...
    > >Sure...
    > >
    > >=SUMPRODUCT((RangeA="Criterion")*(RangeB="Criterion")
    > >*(RangeC="Criterion")*(RangeToSum))

    > ...
    >
    > I'm not an absolutist about using separate arguments for all criteria
    > arguments, but the value array should be a separate argument in
    > conditional sums (as opposed to conditional counts), i.e.,
    >
    > =SUMPRODUCT((RangeA="Criterion")*(RangeB="Criterion")
    > *(RangeC="Criterion"),RangeToSum)
    >
    > because SUMPRODUCT will ignore entries in RangeToSum that aren't
    > numeric and can't be converted to numeric *IF* RangeToSum were a
    > separate argument. In that situation, your formula would return
    > #VALUE!.


  51. #51
    KL
    Guest

    Re: SumIf function

    Hi,

    Try this:

    =SUMPRODUCT(((A2:A6="Dividend")+(A2:A6="Interest")>0)*(B2:D6))

    Your formula basically says sum if a cell is equal to "Dividend" AND
    "Interest" (which isn't possible) while it should say sum if a cell is equal
    to "Dividend" OR "Interest"

    Regards,
    KL


    "nc" <[email protected]> wrote in message
    news:[email protected]...
    > Hi Domenic
    >
    > I tried using the following function,
    >
    > =SUMPRODUCT((A2:A6="Dividend")*(A2:A6="Interest")*(B2:D6)) with the table
    > below and I get a value of zero. I was expecting 1200.
    >
    > Jan Feb March
    > Dividend 100 100 100
    > Interest 100 100 100
    > Expenses -100 -100 -100
    > Dividend 100 100 100
    > Interest 100 100 100
    >
    >
    > Thanks.
    >
    >
    > "Domenic" wrote:
    >
    >> Sure...
    >>
    >> =SUMPRODUCT((RangeA="Criterion")*(RangeB="Criterion")*(RangeC="Criterion"
    >> )*(RangeToSum))
    >>
    >> Remove the quotes if your criterion is a numerical value.
    >>
    >> Hope this helps!
    >>
    >> In article <[email protected]>,
    >> "nc" <[email protected]> wrote:
    >>
    >> > Thanks Domenic.
    >> >
    >> > Can this function be adapted to use more than one criteria.

    >>




  52. #52
    Harlan Grove
    Guest

    Re: SumIf function

    Domenic wrote...
    >Sure...
    >
    >=SUMPRODUCT((RangeA="Criterion")*(RangeB="Criterion")
    >*(RangeC="Criterion")*(RangeToSum))

    ....

    I'm not an absolutist about using separate arguments for all criteria
    arguments, but the value array should be a separate argument in
    conditional sums (as opposed to conditional counts), i.e.,

    =SUMPRODUCT((RangeA="Criterion")*(RangeB="Criterion")
    *(RangeC="Criterion"),RangeToSum)

    because SUMPRODUCT will ignore entries in RangeToSum that aren't
    numeric and can't be converted to numeric *IF* RangeToSum were a
    separate argument. In that situation, your formula would return
    #VALUE!.


  53. #53
    Domenic
    Guest

    Re: SumIf function

    Sure...

    =SUMPRODUCT((RangeA="Criterion")*(RangeB="Criterion")*(RangeC="Criterion"
    )*(RangeToSum))

    Remove the quotes if your criterion is a numerical value.

    Hope this helps!

    In article <[email protected]>,
    "nc" <[email protected]> wrote:

    > Thanks Domenic.
    >
    > Can this function be adapted to use more than one criteria.


  54. #54
    Aladin Akyurek
    Guest

    Re: SumIf function

    Why not create an additional column, say E, that sums monthly values
    like in:

    E2, copied down:

    =SUM(B2:D2)

    which allows you to avoid expensive conditional calculations?

    nc wrote:
    > Hi Domenic
    >
    > I tried using the following function,
    >
    > =SUMPRODUCT((A2:A6="Dividend")*(A2:A6="Interest")*(B2:D6)) with the table
    > below and I get a value of zero. I was expecting 1200.
    >
    > Jan Feb March
    > Dividend 100 100 100
    > Interest 100 100 100
    > Expenses -100 -100 -100
    > Dividend 100 100 100
    > Interest 100 100 100
    >
    >
    > Thanks.
    >
    >
    > "Domenic" wrote:
    >
    >
    >>Sure...
    >>
    >>=SUMPRODUCT((RangeA="Criterion")*(RangeB="Criterion")*(RangeC="Criterion"
    >>)*(RangeToSum))
    >>
    >>Remove the quotes if your criterion is a numerical value.
    >>
    >>Hope this helps!
    >>
    >>In article <[email protected]>,
    >> "nc" <[email protected]> wrote:
    >>
    >>
    >>>Thanks Domenic.
    >>>
    >>>Can this function be adapted to use more than one criteria.

    >>


  55. #55
    nc
    Guest

    Re: SumIf function

    Thanks Domenic.

    Can this function be adapted to use more than one criteria.

    "Domenic" wrote:

    > Try...
    >
    > =SUMPRODUCT((A2:A6="Income")*(B2:E6))
    >
    > Adjust the range accordingly.
    >
    > Hope this helps!
    >
    > In article <[email protected]>,
    > "nc" <[email protected]> wrote:
    >
    > > EENF EPDA EKHC GGEN
    > > Expenditure 1 2 3 4
    > > Income 2 2 2 6
    > > Capital additions 5 2 4 5
    > > Income 7 8 9 5
    > > Capital additions 10 11 12 11
    > >
    > > How can I total the more than one column if the criteria is "Income"?

    >


  56. #56
    Domenic
    Guest

    Re: SumIf function

    Most definitely...

    In article <[email protected]>,
    Aladin Akyurek <[email protected]> wrote:

    > Why not create an additional column, say E, that sums monthly values
    > like in:
    >
    > E2, copied down:
    >
    > =SUM(B2:D2)
    >
    > which allows you to avoid expensive conditional calculations?
    >
    > nc wrote:
    > > Hi Domenic
    > >
    > > I tried using the following function,
    > >
    > > =SUMPRODUCT((A2:A6="Dividend")*(A2:A6="Interest")*(B2:D6)) with the table
    > > below and I get a value of zero. I was expecting 1200.
    > >
    > > Jan Feb March
    > > Dividend 100 100 100
    > > Interest 100 100 100
    > > Expenses -100 -100 -100
    > > Dividend 100 100 100
    > > Interest 100 100 100
    > >
    > >
    > > Thanks.
    > >
    > >
    > > "Domenic" wrote:
    > >
    > >
    > >>Sure...
    > >>
    > >>=SUMPRODUCT((RangeA="Criterion")*(RangeB="Criterion")*(RangeC="Criterion"
    > >>)*(RangeToSum))
    > >>
    > >>Remove the quotes if your criterion is a numerical value.
    > >>
    > >>Hope this helps!
    > >>
    > >>In article <[email protected]>,
    > >> "nc" <[email protected]> wrote:
    > >>
    > >>
    > >>>Thanks Domenic.
    > >>>
    > >>>Can this function be adapted to use more than one criteria.
    > >>


  57. #57
    Bob Phillips
    Guest

    Re: SumIf function

    =sumif(A2:A20="Income"),B2:B20)+sumif(A2:A20="Income"),C2:C20)

    --

    HTH

    RP
    (remove nothere from the email address if mailing direct)


    "nc" <[email protected]> wrote in message
    news:[email protected]...
    > EENF EPDA EKHC GGEN
    > Expenditure 1 2 3 4
    > Income 2 2 2 6
    > Capital additions 5 2 4 5
    > Income 7 8 9 5
    > Capital additions 10 11 12 11
    >
    > How can I total the more than one column if the criteria is "Income"?




  58. #58
    nc
    Guest

    Re: SumIf function

    Thanks Bob.

    I have about 10 columns. I was looking for a symplified function.

    "Bob Phillips" wrote:

    > =sumif(A2:A20="Income"),B2:B20)+sumif(A2:A20="Income"),C2:C20)
    >
    > --
    >
    > HTH
    >
    > RP
    > (remove nothere from the email address if mailing direct)
    >
    >
    > "nc" <[email protected]> wrote in message
    > news:[email protected]...
    > > EENF EPDA EKHC GGEN
    > > Expenditure 1 2 3 4
    > > Income 2 2 2 6
    > > Capital additions 5 2 4 5
    > > Income 7 8 9 5
    > > Capital additions 10 11 12 11
    > >
    > > How can I total the more than one column if the criteria is "Income"?

    >
    >
    >


  59. #59
    Duke Carey
    Guest

    Re: SumIf function

    Then add one more column that sums across the row, then use one of Bob's
    SUMIF() functions and reference the new column

    "nc" wrote:

    > Thanks Bob.
    >
    > I have about 10 columns. I was looking for a symplified function.
    >
    > "Bob Phillips" wrote:
    >
    > > =sumif(A2:A20="Income"),B2:B20)+sumif(A2:A20="Income"),C2:C20)
    > >
    > > --
    > >
    > > HTH
    > >
    > > RP
    > > (remove nothere from the email address if mailing direct)
    > >
    > >
    > > "nc" <[email protected]> wrote in message
    > > news:[email protected]...
    > > > EENF EPDA EKHC GGEN
    > > > Expenditure 1 2 3 4
    > > > Income 2 2 2 6
    > > > Capital additions 5 2 4 5
    > > > Income 7 8 9 5
    > > > Capital additions 10 11 12 11
    > > >
    > > > How can I total the more than one column if the criteria is "Income"?

    > >
    > >
    > >


  60. #60
    Bob Phillips
    Guest

    Re: SumIf function

    Here is a formula with a few columns, add the rest

    =SUMPRODUCT(--(A2:A20="Income"),B2:B20+C2:C20+D2:D20)

    --

    HTH

    RP
    (remove nothere from the email address if mailing direct)


    "nc" <[email protected]> wrote in message
    news:[email protected]...
    > Thanks Bob.
    >
    > I have about 10 columns. I was looking for a symplified function.
    >
    > "Bob Phillips" wrote:
    >
    > > =sumif(A2:A20="Income"),B2:B20)+sumif(A2:A20="Income"),C2:C20)
    > >
    > > --
    > >
    > > HTH
    > >
    > > RP
    > > (remove nothere from the email address if mailing direct)
    > >
    > >
    > > "nc" <[email protected]> wrote in message
    > > news:[email protected]...
    > > > EENF EPDA EKHC GGEN
    > > > Expenditure 1 2 3 4
    > > > Income 2 2 2 6
    > > > Capital additions 5 2 4 5
    > > > Income 7 8 9 5
    > > > Capital additions 10 11 12 11
    > > >
    > > > How can I total the more than one column if the criteria is "Income"?

    > >
    > >
    > >




  61. #61
    Domenic
    Guest

    Re: SumIf function

    Try...

    =SUMPRODUCT((A2:A6="Income")*(B2:E6))

    Adjust the range accordingly.

    Hope this helps!

    In article <[email protected]>,
    "nc" <[email protected]> wrote:

    > EENF EPDA EKHC GGEN
    > Expenditure 1 2 3 4
    > Income 2 2 2 6
    > Capital additions 5 2 4 5
    > Income 7 8 9 5
    > Capital additions 10 11 12 11
    >
    > How can I total the more than one column if the criteria is "Income"?


  62. #62
    Aladin Akyurek
    Guest

    Re: SumIf function

    Why not create an additional column, say E, that sums monthly values
    like in:

    E2, copied down:

    =SUM(B2:D2)

    which allows you to avoid expensive conditional calculations?

    nc wrote:
    > Hi Domenic
    >
    > I tried using the following function,
    >
    > =SUMPRODUCT((A2:A6="Dividend")*(A2:A6="Interest")*(B2:D6)) with the table
    > below and I get a value of zero. I was expecting 1200.
    >
    > Jan Feb March
    > Dividend 100 100 100
    > Interest 100 100 100
    > Expenses -100 -100 -100
    > Dividend 100 100 100
    > Interest 100 100 100
    >
    >
    > Thanks.
    >
    >
    > "Domenic" wrote:
    >
    >
    >>Sure...
    >>
    >>=SUMPRODUCT((RangeA="Criterion")*(RangeB="Criterion")*(RangeC="Criterion"
    >>)*(RangeToSum))
    >>
    >>Remove the quotes if your criterion is a numerical value.
    >>
    >>Hope this helps!
    >>
    >>In article <[email protected]>,
    >> "nc" <[email protected]> wrote:
    >>
    >>
    >>>Thanks Domenic.
    >>>
    >>>Can this function be adapted to use more than one criteria.

    >>


  63. #63
    Domenic
    Guest

    Re: SumIf function

    Actually, the following should suffice...

    =SUMPRODUCT(((A2:A6="Dividend")+(A2:A6="Interest"))*(B2:D6))

    or

    =SUMPRODUCT(((A2:A6=F2)+(A2:A6=G2))*(B2:D6))

    ....where F2 contains your first criterion, such as Dividend, and G2
    contains your second criterion, such as Interest.

    Hope this helps!

    In article <#sYNH#[email protected]>,
    "KL" <[email protected]> wrote:

    > Hi,
    >
    > Try this:
    >
    > =SUMPRODUCT(((A2:A6="Dividend")+(A2:A6="Interest")>0)*(B2:D6))
    >
    > Your formula basically says sum if a cell is equal to "Dividend" AND
    > "Interest" (which isn't possible) while it should say sum if a cell is equal
    > to "Dividend" OR "Interest"
    >
    > Regards,
    > KL


  64. #64
    Domenic
    Guest

    Re: SumIf function

    Most definitely...

    In article <[email protected]>,
    Aladin Akyurek <[email protected]> wrote:

    > Why not create an additional column, say E, that sums monthly values
    > like in:
    >
    > E2, copied down:
    >
    > =SUM(B2:D2)
    >
    > which allows you to avoid expensive conditional calculations?
    >
    > nc wrote:
    > > Hi Domenic
    > >
    > > I tried using the following function,
    > >
    > > =SUMPRODUCT((A2:A6="Dividend")*(A2:A6="Interest")*(B2:D6)) with the table
    > > below and I get a value of zero. I was expecting 1200.
    > >
    > > Jan Feb March
    > > Dividend 100 100 100
    > > Interest 100 100 100
    > > Expenses -100 -100 -100
    > > Dividend 100 100 100
    > > Interest 100 100 100
    > >
    > >
    > > Thanks.
    > >
    > >
    > > "Domenic" wrote:
    > >
    > >
    > >>Sure...
    > >>
    > >>=SUMPRODUCT((RangeA="Criterion")*(RangeB="Criterion")*(RangeC="Criterion"
    > >>)*(RangeToSum))
    > >>
    > >>Remove the quotes if your criterion is a numerical value.
    > >>
    > >>Hope this helps!
    > >>
    > >>In article <[email protected]>,
    > >> "nc" <[email protected]> wrote:
    > >>
    > >>
    > >>>Thanks Domenic.
    > >>>
    > >>>Can this function be adapted to use more than one criteria.
    > >>


  65. #65
    Domenic
    Guest

    Re: SumIf function

    Very true...

    In article <[email protected]>,
    "RagDyer" <[email protected]> wrote:

    > But in some (many) situations, that error return would be a welcomed trap,
    > denoting contaminated data.
    > --
    > Regards,
    >
    > RD
    >
    > ---------------------------------------------------------------------------
    > Please keep all correspondence within the NewsGroup, so all may benefit !
    > ---------------------------------------------------------------------------
    >
    > "Harlan Grove" <[email protected]> wrote in message
    > news:[email protected]...
    > > Domenic wrote...
    > > >Sure...
    > > >
    > > >=SUMPRODUCT((RangeA="Criterion")*(RangeB="Criterion")
    > > >*(RangeC="Criterion")*(RangeToSum))

    > > ...
    > >
    > > I'm not an absolutist about using separate arguments for all criteria
    > > arguments, but the value array should be a separate argument in
    > > conditional sums (as opposed to conditional counts), i.e.,
    > >
    > > =SUMPRODUCT((RangeA="Criterion")*(RangeB="Criterion")
    > > *(RangeC="Criterion"),RangeToSum)
    > >
    > > because SUMPRODUCT will ignore entries in RangeToSum that aren't
    > > numeric and can't be converted to numeric *IF* RangeToSum were a
    > > separate argument. In that situation, your formula would return
    > > #VALUE!.
    > >


  66. #66
    nc
    Guest

    Re: SumIf function

    Hi Domenic

    I tried using the following function,

    =SUMPRODUCT((A2:A6="Dividend")*(A2:A6="Interest")*(B2:D6)) with the table
    below and I get a value of zero. I was expecting 1200.

    Jan Feb March
    Dividend 100 100 100
    Interest 100 100 100
    Expenses -100 -100 -100
    Dividend 100 100 100
    Interest 100 100 100


    Thanks.


    "Domenic" wrote:

    > Sure...
    >
    > =SUMPRODUCT((RangeA="Criterion")*(RangeB="Criterion")*(RangeC="Criterion"
    > )*(RangeToSum))
    >
    > Remove the quotes if your criterion is a numerical value.
    >
    > Hope this helps!
    >
    > In article <[email protected]>,
    > "nc" <[email protected]> wrote:
    >
    > > Thanks Domenic.
    > >
    > > Can this function be adapted to use more than one criteria.

    >


  67. #67
    Domenic
    Guest

    Re: SumIf function

    Try...

    =SUMPRODUCT((A2:A6="Income")*(B2:E6))

    Adjust the range accordingly.

    Hope this helps!

    In article <[email protected]>,
    "nc" <[email protected]> wrote:

    > EENF EPDA EKHC GGEN
    > Expenditure 1 2 3 4
    > Income 2 2 2 6
    > Capital additions 5 2 4 5
    > Income 7 8 9 5
    > Capital additions 10 11 12 11
    >
    > How can I total the more than one column if the criteria is "Income"?


  68. #68
    Bob Phillips
    Guest

    Re: SumIf function

    Here is a formula with a few columns, add the rest

    =SUMPRODUCT(--(A2:A20="Income"),B2:B20+C2:C20+D2:D20)

    --

    HTH

    RP
    (remove nothere from the email address if mailing direct)


    "nc" <[email protected]> wrote in message
    news:[email protected]...
    > Thanks Bob.
    >
    > I have about 10 columns. I was looking for a symplified function.
    >
    > "Bob Phillips" wrote:
    >
    > > =sumif(A2:A20="Income"),B2:B20)+sumif(A2:A20="Income"),C2:C20)
    > >
    > > --
    > >
    > > HTH
    > >
    > > RP
    > > (remove nothere from the email address if mailing direct)
    > >
    > >
    > > "nc" <[email protected]> wrote in message
    > > news:[email protected]...
    > > > EENF EPDA EKHC GGEN
    > > > Expenditure 1 2 3 4
    > > > Income 2 2 2 6
    > > > Capital additions 5 2 4 5
    > > > Income 7 8 9 5
    > > > Capital additions 10 11 12 11
    > > >
    > > > How can I total the more than one column if the criteria is "Income"?

    > >
    > >
    > >




  69. #69
    Duke Carey
    Guest

    Re: SumIf function

    Then add one more column that sums across the row, then use one of Bob's
    SUMIF() functions and reference the new column

    "nc" wrote:

    > Thanks Bob.
    >
    > I have about 10 columns. I was looking for a symplified function.
    >
    > "Bob Phillips" wrote:
    >
    > > =sumif(A2:A20="Income"),B2:B20)+sumif(A2:A20="Income"),C2:C20)
    > >
    > > --
    > >
    > > HTH
    > >
    > > RP
    > > (remove nothere from the email address if mailing direct)
    > >
    > >
    > > "nc" <[email protected]> wrote in message
    > > news:[email protected]...
    > > > EENF EPDA EKHC GGEN
    > > > Expenditure 1 2 3 4
    > > > Income 2 2 2 6
    > > > Capital additions 5 2 4 5
    > > > Income 7 8 9 5
    > > > Capital additions 10 11 12 11
    > > >
    > > > How can I total the more than one column if the criteria is "Income"?

    > >
    > >
    > >


  70. #70
    nc
    Guest

    Re: SumIf function

    Thanks Bob.

    I have about 10 columns. I was looking for a symplified function.

    "Bob Phillips" wrote:

    > =sumif(A2:A20="Income"),B2:B20)+sumif(A2:A20="Income"),C2:C20)
    >
    > --
    >
    > HTH
    >
    > RP
    > (remove nothere from the email address if mailing direct)
    >
    >
    > "nc" <[email protected]> wrote in message
    > news:[email protected]...
    > > EENF EPDA EKHC GGEN
    > > Expenditure 1 2 3 4
    > > Income 2 2 2 6
    > > Capital additions 5 2 4 5
    > > Income 7 8 9 5
    > > Capital additions 10 11 12 11
    > >
    > > How can I total the more than one column if the criteria is "Income"?

    >
    >
    >


  71. #71
    Bob Phillips
    Guest

    Re: SumIf function

    =sumif(A2:A20="Income"),B2:B20)+sumif(A2:A20="Income"),C2:C20)

    --

    HTH

    RP
    (remove nothere from the email address if mailing direct)


    "nc" <[email protected]> wrote in message
    news:[email protected]...
    > EENF EPDA EKHC GGEN
    > Expenditure 1 2 3 4
    > Income 2 2 2 6
    > Capital additions 5 2 4 5
    > Income 7 8 9 5
    > Capital additions 10 11 12 11
    >
    > How can I total the more than one column if the criteria is "Income"?




  72. #72
    nc
    Guest

    SumIf function

    EENF EPDA EKHC GGEN
    Expenditure 1 2 3 4
    Income 2 2 2 6
    Capital additions 5 2 4 5
    Income 7 8 9 5
    Capital additions 10 11 12 11

    How can I total the more than one column if the criteria is "Income"?

  73. #73
    nc
    Guest

    Re: SumIf function

    Thanks Domenic.

    Can this function be adapted to use more than one criteria.

    "Domenic" wrote:

    > Try...
    >
    > =SUMPRODUCT((A2:A6="Income")*(B2:E6))
    >
    > Adjust the range accordingly.
    >
    > Hope this helps!
    >
    > In article <[email protected]>,
    > "nc" <[email protected]> wrote:
    >
    > > EENF EPDA EKHC GGEN
    > > Expenditure 1 2 3 4
    > > Income 2 2 2 6
    > > Capital additions 5 2 4 5
    > > Income 7 8 9 5
    > > Capital additions 10 11 12 11
    > >
    > > How can I total the more than one column if the criteria is "Income"?

    >


  74. #74
    Domenic
    Guest

    Re: SumIf function

    Sure...

    =SUMPRODUCT((RangeA="Criterion")*(RangeB="Criterion")*(RangeC="Criterion"
    )*(RangeToSum))

    Remove the quotes if your criterion is a numerical value.

    Hope this helps!

    In article <[email protected]>,
    "nc" <[email protected]> wrote:

    > Thanks Domenic.
    >
    > Can this function be adapted to use more than one criteria.


  75. #75
    Harlan Grove
    Guest

    Re: SumIf function

    Domenic wrote...
    >Sure...
    >
    >=SUMPRODUCT((RangeA="Criterion")*(RangeB="Criterion")
    >*(RangeC="Criterion")*(RangeToSum))

    ....

    I'm not an absolutist about using separate arguments for all criteria
    arguments, but the value array should be a separate argument in
    conditional sums (as opposed to conditional counts), i.e.,

    =SUMPRODUCT((RangeA="Criterion")*(RangeB="Criterion")
    *(RangeC="Criterion"),RangeToSum)

    because SUMPRODUCT will ignore entries in RangeToSum that aren't
    numeric and can't be converted to numeric *IF* RangeToSum were a
    separate argument. In that situation, your formula would return
    #VALUE!.


  76. #76
    Domenic
    Guest

    Re: SumIf function

    Thanks Harlan! The reason I didn't use a separate argument here is that
    the range actually spans a number of columns. I should have made that
    clear...

    Thanks again, Harlan!

    In article <[email protected]>,
    "Harlan Grove" <[email protected]> wrote:

    > Domenic wrote...
    > >Sure...
    > >
    > >=SUMPRODUCT((RangeA="Criterion")*(RangeB="Criterion")
    > >*(RangeC="Criterion")*(RangeToSum))

    > ...
    >
    > I'm not an absolutist about using separate arguments for all criteria
    > arguments, but the value array should be a separate argument in
    > conditional sums (as opposed to conditional counts), i.e.,
    >
    > =SUMPRODUCT((RangeA="Criterion")*(RangeB="Criterion")
    > *(RangeC="Criterion"),RangeToSum)
    >
    > because SUMPRODUCT will ignore entries in RangeToSum that aren't
    > numeric and can't be converted to numeric *IF* RangeToSum were a
    > separate argument. In that situation, your formula would return
    > #VALUE!.


  77. #77
    RagDyer
    Guest

    Re: SumIf function

    But in some (many) situations, that error return would be a welcomed trap,
    denoting contaminated data.
    --
    Regards,

    RD

    ---------------------------------------------------------------------------
    Please keep all correspondence within the NewsGroup, so all may benefit !
    ---------------------------------------------------------------------------

    "Harlan Grove" <[email protected]> wrote in message
    news:[email protected]...
    > Domenic wrote...
    > >Sure...
    > >
    > >=SUMPRODUCT((RangeA="Criterion")*(RangeB="Criterion")
    > >*(RangeC="Criterion")*(RangeToSum))

    > ...
    >
    > I'm not an absolutist about using separate arguments for all criteria
    > arguments, but the value array should be a separate argument in
    > conditional sums (as opposed to conditional counts), i.e.,
    >
    > =SUMPRODUCT((RangeA="Criterion")*(RangeB="Criterion")
    > *(RangeC="Criterion"),RangeToSum)
    >
    > because SUMPRODUCT will ignore entries in RangeToSum that aren't
    > numeric and can't be converted to numeric *IF* RangeToSum were a
    > separate argument. In that situation, your formula would return
    > #VALUE!.
    >



  78. #78
    KL
    Guest

    Re: SumIf function

    Hi,

    Try this:

    =SUMPRODUCT(((A2:A6="Dividend")+(A2:A6="Interest")>0)*(B2:D6))

    Your formula basically says sum if a cell is equal to "Dividend" AND
    "Interest" (which isn't possible) while it should say sum if a cell is equal
    to "Dividend" OR "Interest"

    Regards,
    KL


    "nc" <[email protected]> wrote in message
    news:[email protected]...
    > Hi Domenic
    >
    > I tried using the following function,
    >
    > =SUMPRODUCT((A2:A6="Dividend")*(A2:A6="Interest")*(B2:D6)) with the table
    > below and I get a value of zero. I was expecting 1200.
    >
    > Jan Feb March
    > Dividend 100 100 100
    > Interest 100 100 100
    > Expenses -100 -100 -100
    > Dividend 100 100 100
    > Interest 100 100 100
    >
    >
    > Thanks.
    >
    >
    > "Domenic" wrote:
    >
    >> Sure...
    >>
    >> =SUMPRODUCT((RangeA="Criterion")*(RangeB="Criterion")*(RangeC="Criterion"
    >> )*(RangeToSum))
    >>
    >> Remove the quotes if your criterion is a numerical value.
    >>
    >> Hope this helps!
    >>
    >> In article <[email protected]>,
    >> "nc" <[email protected]> wrote:
    >>
    >> > Thanks Domenic.
    >> >
    >> > Can this function be adapted to use more than one criteria.

    >>




  79. #79
    Domenic
    Guest

    Re: SumIf function

    Very true...

    In article <[email protected]>,
    "RagDyer" <[email protected]> wrote:

    > But in some (many) situations, that error return would be a welcomed trap,
    > denoting contaminated data.
    > --
    > Regards,
    >
    > RD
    >
    > ---------------------------------------------------------------------------
    > Please keep all correspondence within the NewsGroup, so all may benefit !
    > ---------------------------------------------------------------------------
    >
    > "Harlan Grove" <[email protected]> wrote in message
    > news:[email protected]...
    > > Domenic wrote...
    > > >Sure...
    > > >
    > > >=SUMPRODUCT((RangeA="Criterion")*(RangeB="Criterion")
    > > >*(RangeC="Criterion")*(RangeToSum))

    > > ...
    > >
    > > I'm not an absolutist about using separate arguments for all criteria
    > > arguments, but the value array should be a separate argument in
    > > conditional sums (as opposed to conditional counts), i.e.,
    > >
    > > =SUMPRODUCT((RangeA="Criterion")*(RangeB="Criterion")
    > > *(RangeC="Criterion"),RangeToSum)
    > >
    > > because SUMPRODUCT will ignore entries in RangeToSum that aren't
    > > numeric and can't be converted to numeric *IF* RangeToSum were a
    > > separate argument. In that situation, your formula would return
    > > #VALUE!.
    > >


  80. #80
    nc
    Guest

    Re: SumIf function

    Thanks Domenic.

    Can this function be adapted to use more than one criteria.

    "Domenic" wrote:

    > Try...
    >
    > =SUMPRODUCT((A2:A6="Income")*(B2:E6))
    >
    > Adjust the range accordingly.
    >
    > Hope this helps!
    >
    > In article <[email protected]>,
    > "nc" <[email protected]> wrote:
    >
    > > EENF EPDA EKHC GGEN
    > > Expenditure 1 2 3 4
    > > Income 2 2 2 6
    > > Capital additions 5 2 4 5
    > > Income 7 8 9 5
    > > Capital additions 10 11 12 11
    > >
    > > How can I total the more than one column if the criteria is "Income"?

    >


  81. #81
    RagDyer
    Guest

    Re: SumIf function

    But in some (many) situations, that error return would be a welcomed trap,
    denoting contaminated data.
    --
    Regards,

    RD

    ---------------------------------------------------------------------------
    Please keep all correspondence within the NewsGroup, so all may benefit !
    ---------------------------------------------------------------------------

    "Harlan Grove" <[email protected]> wrote in message
    news:[email protected]...
    > Domenic wrote...
    > >Sure...
    > >
    > >=SUMPRODUCT((RangeA="Criterion")*(RangeB="Criterion")
    > >*(RangeC="Criterion")*(RangeToSum))

    > ...
    >
    > I'm not an absolutist about using separate arguments for all criteria
    > arguments, but the value array should be a separate argument in
    > conditional sums (as opposed to conditional counts), i.e.,
    >
    > =SUMPRODUCT((RangeA="Criterion")*(RangeB="Criterion")
    > *(RangeC="Criterion"),RangeToSum)
    >
    > because SUMPRODUCT will ignore entries in RangeToSum that aren't
    > numeric and can't be converted to numeric *IF* RangeToSum were a
    > separate argument. In that situation, your formula would return
    > #VALUE!.
    >



  82. #82
    nc
    Guest

    Re: SumIf function

    Hi Domenic

    I tried using the following function,

    =SUMPRODUCT((A2:A6="Dividend")*(A2:A6="Interest")*(B2:D6)) with the table
    below and I get a value of zero. I was expecting 1200.

    Jan Feb March
    Dividend 100 100 100
    Interest 100 100 100
    Expenses -100 -100 -100
    Dividend 100 100 100
    Interest 100 100 100


    Thanks.


    "Domenic" wrote:

    > Sure...
    >
    > =SUMPRODUCT((RangeA="Criterion")*(RangeB="Criterion")*(RangeC="Criterion"
    > )*(RangeToSum))
    >
    > Remove the quotes if your criterion is a numerical value.
    >
    > Hope this helps!
    >
    > In article <[email protected]>,
    > "nc" <[email protected]> wrote:
    >
    > > Thanks Domenic.
    > >
    > > Can this function be adapted to use more than one criteria.

    >


  83. #83
    Domenic
    Guest

    Re: SumIf function

    Thanks Harlan! The reason I didn't use a separate argument here is that
    the range actually spans a number of columns. I should have made that
    clear...

    Thanks again, Harlan!

    In article <[email protected]>,
    "Harlan Grove" <[email protected]> wrote:

    > Domenic wrote...
    > >Sure...
    > >
    > >=SUMPRODUCT((RangeA="Criterion")*(RangeB="Criterion")
    > >*(RangeC="Criterion")*(RangeToSum))

    > ...
    >
    > I'm not an absolutist about using separate arguments for all criteria
    > arguments, but the value array should be a separate argument in
    > conditional sums (as opposed to conditional counts), i.e.,
    >
    > =SUMPRODUCT((RangeA="Criterion")*(RangeB="Criterion")
    > *(RangeC="Criterion"),RangeToSum)
    >
    > because SUMPRODUCT will ignore entries in RangeToSum that aren't
    > numeric and can't be converted to numeric *IF* RangeToSum were a
    > separate argument. In that situation, your formula would return
    > #VALUE!.


  84. #84
    KL
    Guest

    Re: SumIf function

    Hi,

    Try this:

    =SUMPRODUCT(((A2:A6="Dividend")+(A2:A6="Interest")>0)*(B2:D6))

    Your formula basically says sum if a cell is equal to "Dividend" AND
    "Interest" (which isn't possible) while it should say sum if a cell is equal
    to "Dividend" OR "Interest"

    Regards,
    KL


    "nc" <[email protected]> wrote in message
    news:[email protected]...
    > Hi Domenic
    >
    > I tried using the following function,
    >
    > =SUMPRODUCT((A2:A6="Dividend")*(A2:A6="Interest")*(B2:D6)) with the table
    > below and I get a value of zero. I was expecting 1200.
    >
    > Jan Feb March
    > Dividend 100 100 100
    > Interest 100 100 100
    > Expenses -100 -100 -100
    > Dividend 100 100 100
    > Interest 100 100 100
    >
    >
    > Thanks.
    >
    >
    > "Domenic" wrote:
    >
    >> Sure...
    >>
    >> =SUMPRODUCT((RangeA="Criterion")*(RangeB="Criterion")*(RangeC="Criterion"
    >> )*(RangeToSum))
    >>
    >> Remove the quotes if your criterion is a numerical value.
    >>
    >> Hope this helps!
    >>
    >> In article <[email protected]>,
    >> "nc" <[email protected]> wrote:
    >>
    >> > Thanks Domenic.
    >> >
    >> > Can this function be adapted to use more than one criteria.

    >>




  85. #85
    Domenic
    Guest

    Re: SumIf function

    Sure...

    =SUMPRODUCT((RangeA="Criterion")*(RangeB="Criterion")*(RangeC="Criterion"
    )*(RangeToSum))

    Remove the quotes if your criterion is a numerical value.

    Hope this helps!

    In article <[email protected]>,
    "nc" <[email protected]> wrote:

    > Thanks Domenic.
    >
    > Can this function be adapted to use more than one criteria.


  86. #86
    Domenic
    Guest

    Re: SumIf function

    Actually, the following should suffice...

    =SUMPRODUCT(((A2:A6="Dividend")+(A2:A6="Interest"))*(B2:D6))

    or

    =SUMPRODUCT(((A2:A6=F2)+(A2:A6=G2))*(B2:D6))

    ....where F2 contains your first criterion, such as Dividend, and G2
    contains your second criterion, such as Interest.

    Hope this helps!

    In article <#sYNH#[email protected]>,
    "KL" <[email protected]> wrote:

    > Hi,
    >
    > Try this:
    >
    > =SUMPRODUCT(((A2:A6="Dividend")+(A2:A6="Interest")>0)*(B2:D6))
    >
    > Your formula basically says sum if a cell is equal to "Dividend" AND
    > "Interest" (which isn't possible) while it should say sum if a cell is equal
    > to "Dividend" OR "Interest"
    >
    > Regards,
    > KL


  87. #87
    Harlan Grove
    Guest

    Re: SumIf function

    Domenic wrote...
    >Sure...
    >
    >=SUMPRODUCT((RangeA="Criterion")*(RangeB="Criterion")
    >*(RangeC="Criterion")*(RangeToSum))

    ....

    I'm not an absolutist about using separate arguments for all criteria
    arguments, but the value array should be a separate argument in
    conditional sums (as opposed to conditional counts), i.e.,

    =SUMPRODUCT((RangeA="Criterion")*(RangeB="Criterion")
    *(RangeC="Criterion"),RangeToSum)

    because SUMPRODUCT will ignore entries in RangeToSum that aren't
    numeric and can't be converted to numeric *IF* RangeToSum were a
    separate argument. In that situation, your formula would return
    #VALUE!.


  88. #88
    Aladin Akyurek
    Guest

    Re: SumIf function

    Why not create an additional column, say E, that sums monthly values
    like in:

    E2, copied down:

    =SUM(B2:D2)

    which allows you to avoid expensive conditional calculations?

    nc wrote:
    > Hi Domenic
    >
    > I tried using the following function,
    >
    > =SUMPRODUCT((A2:A6="Dividend")*(A2:A6="Interest")*(B2:D6)) with the table
    > below and I get a value of zero. I was expecting 1200.
    >
    > Jan Feb March
    > Dividend 100 100 100
    > Interest 100 100 100
    > Expenses -100 -100 -100
    > Dividend 100 100 100
    > Interest 100 100 100
    >
    >
    > Thanks.
    >
    >
    > "Domenic" wrote:
    >
    >
    >>Sure...
    >>
    >>=SUMPRODUCT((RangeA="Criterion")*(RangeB="Criterion")*(RangeC="Criterion"
    >>)*(RangeToSum))
    >>
    >>Remove the quotes if your criterion is a numerical value.
    >>
    >>Hope this helps!
    >>
    >>In article <[email protected]>,
    >> "nc" <[email protected]> wrote:
    >>
    >>
    >>>Thanks Domenic.
    >>>
    >>>Can this function be adapted to use more than one criteria.

    >>


  89. #89
    Domenic
    Guest

    Re: SumIf function

    Most definitely...

    In article <[email protected]>,
    Aladin Akyurek <[email protected]> wrote:

    > Why not create an additional column, say E, that sums monthly values
    > like in:
    >
    > E2, copied down:
    >
    > =SUM(B2:D2)
    >
    > which allows you to avoid expensive conditional calculations?
    >
    > nc wrote:
    > > Hi Domenic
    > >
    > > I tried using the following function,
    > >
    > > =SUMPRODUCT((A2:A6="Dividend")*(A2:A6="Interest")*(B2:D6)) with the table
    > > below and I get a value of zero. I was expecting 1200.
    > >
    > > Jan Feb March
    > > Dividend 100 100 100
    > > Interest 100 100 100
    > > Expenses -100 -100 -100
    > > Dividend 100 100 100
    > > Interest 100 100 100
    > >
    > >
    > > Thanks.
    > >
    > >
    > > "Domenic" wrote:
    > >
    > >
    > >>Sure...
    > >>
    > >>=SUMPRODUCT((RangeA="Criterion")*(RangeB="Criterion")*(RangeC="Criterion"
    > >>)*(RangeToSum))
    > >>
    > >>Remove the quotes if your criterion is a numerical value.
    > >>
    > >>Hope this helps!
    > >>
    > >>In article <[email protected]>,
    > >> "nc" <[email protected]> wrote:
    > >>
    > >>
    > >>>Thanks Domenic.
    > >>>
    > >>>Can this function be adapted to use more than one criteria.
    > >>


+ 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