View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Ken Johnson Ken Johnson is offline
external usenet poster
 
Posts: 1,073
Default Finding the number of times a word is used in a range of cells

One thing to keep in mind about using COUNTIF with the * wildcard is
that it doesn't actually count the instances of "Arizona" in L8:L100,
it only counts the cells with one or more instances of "Arizona". So,
if any of your cells have for example "Arizona Arizona" each such cell
will only add 1 to the count instead of 2.

If you need to count all the instances of "Arizona" in L8:L100 you
could use this array formula...
=SUM(LEN(L8:L100)-LEN(SUBSTITUTE(L8:L100,"Arizona","")))/LEN
("Arizona")

Since it is an array formula it needs to be entered using Ctrl+Shift
+Enter when added to the sheet as well as after each time has been
edited.

Ken Johnson