View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.misc
Infinitogool Infinitogool is offline
external usenet poster
 
Posts: 52
Default Formula question

fgbdrum escribió:
Here's my spreadsheet:

Column A Column B
N Red
N Blue
N Red
Orange
N Blue
Red
N Yellow

Here's what I'd like to accomplish:
If there's an "N" in column A, then count the number of times "Red" and
"Blue" appear in column B. If there is no "N" in column A, do not count it.
In the above example, I'd expect the formula to return a result of four.

Thanks for the help.


You could use
=SUMPRODUCT(--(A1:A100="N"),--(B1:B100={"RED","BLUE"}))

Best Regards,
Pedro J.