View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Harlan Grove Harlan Grove is offline
external usenet poster
 
Posts: 733
Default If function with and

dereksmom wrote...
. . . If a cell in Column A is
"OPEN" and a cell in column B is "OPEN", then the result in a cell
in Column C should be 1. Otherwise, the result will be 0.

....

One way

C2:
=--(COUNTIF(A2:B2,"OPEN")=2)

and another

C2:
=--AND(A2="OPEN",B2="OPEN")

Latter is shorter with 2 cells, but former becomes more compact with 3
or more cells.