View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Ardus Petus Ardus Petus is offline
external usenet poster
 
Posts: 718
Default SUMPRODUCT and OR operator

Try:
=SUMPRODUCT((A1:A5="yes")*((G1:G5="yes")+(H1:H5="Y es")0))

HTH
--
AP

"Madiya" a écrit dans le message de news:
...
I need to count the no of cells that has Col A=yes and (Either Col G or
Col H )=yes.
This is somewhat different then using OR operator in the same
column(like Col G=red or blue should be counted). What I want is If
cell value in any of the col in same row is yes then it sould be
counted.
for e.g. if Row 15 has in
col G yes and col H nil - counted
col G nil and col H nil - not counted
col G yes and col H yes - counted
col G nil and col H yes - counted

I hope I have clearly explained my problem. How can I do it?

Regards,
Madiya