PDA

View Full Version : Solved: How Do I Count 2



drums4monty
12-07-2006, 04:09 AM
Hi all

I am using this code to count the word yes in a range (thanks to dr for the help), how do I make it count the word "yes" or the letter "y". This is to account for the user either typing yes or just y.

=COUNTIF(C9:C25,"yes")

Alan

RichardSchollar
12-07-2006, 04:34 AM
Hi Alan

=COUNTIF(C9:C25,"y*")

will count abything beginning with a "y" - if you want to ensure it only counts "y" or "yes" then maybe:

=SUM(COUNTIF(C9:C25,{"y","yes"}))

Hope this helps!

Richard

drums4monty
12-07-2006, 04:48 AM
Thanks Richard