ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   how to return a result from 2 conditions? (https://www.excelbanter.com/excel-worksheet-functions/149287-how-return-result-2-conditions.html)

Christy

how to return a result from 2 conditions?
 
From the information below, I'm need a formula that when
the column A1:A3 = 6/27/07 AND column C1:C3 = in, then count column B1:B3

date count in/ot/dd
6/27/07 10 in
6/30/07 1 dd
7/6/07 9 ot

In this example above the correct result would be 10 but I can't get a
formula to consider 2 conditions. (Excel 2003) Thanks.







Elkar

how to return a result from 2 conditions?
 
Try this:

=SUMPRODUCT(--(A1:A3=DATE(2007,6,27)),--(C1:C3="in"),B1:B3)

HTH,
Elkar


"Christy" wrote:

From the information below, I'm need a formula that when
the column A1:A3 = 6/27/07 AND column C1:C3 = in, then count column B1:B3

date count in/ot/dd
6/27/07 10 in
6/30/07 1 dd
7/6/07 9 ot

In this example above the correct result would be 10 but I can't get a
formula to consider 2 conditions. (Excel 2003) Thanks.







Christy

how to return a result from 2 conditions?
 
It works! Thanks so much.

"Elkar" wrote:

Try this:

=SUMPRODUCT(--(A1:A3=DATE(2007,6,27)),--(C1:C3="in"),B1:B3)

HTH,
Elkar


"Christy" wrote:

From the information below, I'm need a formula that when
the column A1:A3 = 6/27/07 AND column C1:C3 = in, then count column B1:B3

date count in/ot/dd
6/27/07 10 in
6/30/07 1 dd
7/6/07 9 ot

In this example above the correct result would be 10 but I can't get a
formula to consider 2 conditions. (Excel 2003) Thanks.








All times are GMT +1. The time now is 09:13 AM.

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