ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Formula for multiple criteria in a column. (https://www.excelbanter.com/excel-worksheet-functions/210218-formula-multiple-criteria-column.html)

Bruce Benaway

Formula for multiple criteria in a column.
 
Ok, have used this formula to look at two criteria and gives me a sum.
However, if there are more that two criteria in column B, which includes for
examples the names of Bill and Dave, how would I alter the formula to pick up
the additional name of Dave in column B.

=SUMPRODUCT((A1:A5="Feb")*(B1:B5="Bill")*C1:F4)

A B C D E
F
1 Jan Bill 55 23 24
65
2 Feb Bill 66 22 22
22
3 Feb Dave 55 66 66
34
4 Feb Bill 98 93 54
25
5 Feb Greg 55 66 22
55

--
Bruce

Rick Rothstein

Formula for multiple criteria in a column.
 
You are looking for either Bill or Dave, right? Try this formula...

=SUMPRODUCT((A1:A5="Feb")*((B1:B5="Bill")+(B1:B5=" Dave"))*C1:F5)

--
Rick (MVP - Excel)


"Bruce Benaway" wrote in message
...
Ok, have used this formula to look at two criteria and gives me a sum.
However, if there are more that two criteria in column B, which includes
for
examples the names of Bill and Dave, how would I alter the formula to pick
up
the additional name of Dave in column B.

=SUMPRODUCT((A1:A5="Feb")*(B1:B5="Bill")*C1:F4)

A B C D E
F
1 Jan Bill 55 23 24
65
2 Feb Bill 66 22 22
22
3 Feb Dave 55 66 66
34
4 Feb Bill 98 93 54
25
5 Feb Greg 55 66 22
55

--
Bruce




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

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