ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Excel formula (https://www.excelbanter.com/excel-worksheet-functions/23040-excel-formula.html)

Shirley

Excel formula
 
I am using an excel spreadsheet to count the occurrences
in two different columns and can't figure out the
formula. For example, I want a total of cells that have
a "yes" in column L and a "yes" in column O, if there is
only a "yes" in one of the columns I don't want to count
it.

N Harkawat

=sumproduct(--(L1:L1000="Yes"),--(O1:O1000="Yes"))

"Shirley" wrote in message
...
I am using an excel spreadsheet to count the occurrences
in two different columns and can't figure out the
formula. For example, I want a total of cells that have
a "yes" in column L and a "yes" in column O, if there is
only a "yes" in one of the columns I don't want to count
it.





Hi

Try something like:
=SUMPRODUCT((L2:L11="yes")*(O2:O11="yes"))
When using SUMPRODUCT(), the ranges must contain the same number of cells,
and you cannot use full column references.

--
Andy.


"Shirley" wrote in message
...
I am using an excel spreadsheet to count the occurrences
in two different columns and can't figure out the
formula. For example, I want a total of cells that have
a "yes" in column L and a "yes" in column O, if there is
only a "yes" in one of the columns I don't want to count
it.





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

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