View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Gary''s Student Gary''s Student is offline
external usenet poster
 
Posts: 11,058
Default Count the number of cells in a range with a string containing a sp

Sub routine()
MsgBox (Application.WorksheetFunction.CountIf(Selection, "*e*"))
End Sub


will indicate how many cell in Selection contain an e within them. Adapt as
you wish.


b.t.w works the same way on the worksheet.
--
Gary''s Student
gsnu200711