ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Embedding a Sumif in a sumif (https://www.excelbanter.com/excel-worksheet-functions/43307-embedding-sumif-sumif.html)

C.Pflugrath

Embedding a Sumif in a sumif
 
Attempted to embed a sumif into a sumif. Formula
=sumif(Gift,1,sumif(PerPay,"<0",Children)) returns message "The formula you
types contains an error."

Need to sum the range "Children" based on criteria in both the "Gift" and
"PerPay" colums. Suggentions? Alternatives?

.. . . Cheers & Thank You
C.Pflugrath

Duke Carey

maybe..

=SUMPRODUCT(--(gift=1),--(perpay<0),children)


"C.Pflugrath" wrote:

Attempted to embed a sumif into a sumif. Formula
=sumif(Gift,1,sumif(PerPay,"<0",Children)) returns message "The formula you
types contains an error."

Need to sum the range "Children" based on criteria in both the "Gift" and
"PerPay" colums. Suggentions? Alternatives?

. . . Cheers & Thank You
C.Pflugrath


Peo Sjoblom

=SUMPRODUCT(--(Gift=1),--(PerPay<0),Children)

--
Regards,

Peo Sjoblom

(No private emails please)


"C.Pflugrath" wrote in message
...
Attempted to embed a sumif into a sumif. Formula
=sumif(Gift,1,sumif(PerPay,"<0",Children)) returns message "The formula
you
types contains an error."

Need to sum the range "Children" based on criteria in both the "Gift" and
"PerPay" colums. Suggentions? Alternatives?

. . . Cheers & Thank You
C.Pflugrath



Bernie Deitrick

C,

=SUMPRODUCT((Gift=1)*(PerPay<0)*Children)

HTH,
Bernie
MS Excel MVP


"C.Pflugrath" wrote in message
...
Attempted to embed a sumif into a sumif. Formula
=sumif(Gift,1,sumif(PerPay,"<0",Children)) returns message "The formula you
types contains an error."

Need to sum the range "Children" based on criteria in both the "Gift" and
"PerPay" colums. Suggentions? Alternatives?

. . . Cheers & Thank You
C.Pflugrath




Roger Govier

One way
=SUMPRODUCT(--(Gift=1),--(PerPay<0),Children)
This assumes the ranges are of equal size.

--
Regards

Roger Govier


"C.Pflugrath" wrote in message
...
Attempted to embed a sumif into a sumif. Formula
=sumif(Gift,1,sumif(PerPay,"<0",Children)) returns message "The formula
you
types contains an error."

Need to sum the range "Children" based on criteria in both the "Gift" and
"PerPay" colums. Suggentions? Alternatives?

. . . Cheers & Thank You
C.Pflugrath




C.Pflugrath

Fabolous! Thank You!
--
.. . . Cheers
C.Pflugrath


"Duke Carey" wrote:

maybe..

=SUMPRODUCT(--(gift=1),--(perpay<0),children)


"C.Pflugrath" wrote:

Attempted to embed a sumif into a sumif. Formula
=sumif(Gift,1,sumif(PerPay,"<0",Children)) returns message "The formula you
types contains an error."

Need to sum the range "Children" based on criteria in both the "Gift" and
"PerPay" colums. Suggentions? Alternatives?

. . . Cheers & Thank You
C.Pflugrath



All times are GMT +1. The time now is 06:06 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com