ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   sum a range if two conditions are met (https://www.excelbanter.com/excel-discussion-misc-queries/154109-sum-range-if-two-conditions-met.html)

Valerie

sum a range if two conditions are met
 
I would like to sum the numbers in a column that coincide with the rows where
the numbers in two other columns meet a certain condition.

For example, I need to find all rows where column A and column B have a
value of one; then the corresponding values for those rows in column C need
to be summed. I thought this may be a sumif formula, however I don't know if
more than one function can be nested in a sumif formula.

Any help with this would be greatly appreciated.
--
Valerie

Mike H

sum a range if two conditions are met
 
Try,

=SUMPRODUCT((A1:A20=1)*(B1:B20=1)*(C1:C20))

Mike

"Valerie" wrote:

I would like to sum the numbers in a column that coincide with the rows where
the numbers in two other columns meet a certain condition.

For example, I need to find all rows where column A and column B have a
value of one; then the corresponding values for those rows in column C need
to be summed. I thought this may be a sumif formula, however I don't know if
more than one function can be nested in a sumif formula.

Any help with this would be greatly appreciated.
--
Valerie


Farhad

sum a range if two conditions are met
 
Hi,

Try This:

=SUMPRODUCT(--(A1:A100=B1:B100),C1:C100)

Thanks,
--
Farhad Hodjat


"Valerie" wrote:

I would like to sum the numbers in a column that coincide with the rows where
the numbers in two other columns meet a certain condition.

For example, I need to find all rows where column A and column B have a
value of one; then the corresponding values for those rows in column C need
to be summed. I thought this may be a sumif formula, however I don't know if
more than one function can be nested in a sumif formula.

Any help with this would be greatly appreciated.
--
Valerie


Farhad

sum a range if two conditions are met
 
Sorry it was a missunderestood the formula i gave you sums all rows that A &
B are equal Mike H's answer is correct.

Thanks,
--
Farhad Hodjat


"Farhad" wrote:

Hi,

Try This:

=SUMPRODUCT(--(A1:A100=B1:B100),C1:C100)

Thanks,
--
Farhad Hodjat


"Valerie" wrote:

I would like to sum the numbers in a column that coincide with the rows where
the numbers in two other columns meet a certain condition.

For example, I need to find all rows where column A and column B have a
value of one; then the corresponding values for those rows in column C need
to be summed. I thought this may be a sumif formula, however I don't know if
more than one function can be nested in a sumif formula.

Any help with this would be greatly appreciated.
--
Valerie



All times are GMT +1. The time now is 11:17 AM.

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