Thread: Formula Help
View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Gary''s Student Gary''s Student is offline
external usenet poster
 
Posts: 11,058
Default Formula Help

For a single item, say, B4:

=LOOKUP(B4,{"F","NR","P",""},{1,0,0,""})


to count the "P"

=COUNTIF(B4:U4,"F")

to count the "F" and "NR"

=COUNTIF(B4:U4,"F")+COUNTIF(B4:U4,"NR")
--
Gary''s Student - gsnu200811


"V_Ernst" wrote:

My range is B4:U4. Cells may contain the letter "P", the letter "F", the
letters "NR" or they are blank.

I want to return a "1" if there is a "P", the number "0" if there is a "F"
or an "NR" and then the total number of "P" and the total number of "F " and
"NR"

Thanks!

--
V_Ernst