View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.misc
laandmc laandmc is offline
external usenet poster
 
Posts: 23
Default countif, multiple value range PLEASE HELP

I have a set of data where I want to count some values with a range of
different outcomes:

a b c d
a a c e

0 = COUNTIF(A2:D2,OR(A1,B1,C1,D1))
3 <-- Answer I want to get

The Bottom answer is what I want to get
The Top answe is what I am getting

Is there a way of doing this without doing a long formula such as:
= COUNTIF(A2:D2,A1)+COUNTIF(A2:D2,B1)+COUNTIF(A2:D2, C1)+COUNTIF(A2:D2,D1)

My formula is already very complicated so I want to avoid doing this if
possible