View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.misc
Gary''s Student Gary''s Student is offline
external usenet poster
 
Posts: 11,058
Default Number of Occurrences of a String Value within a String

With the text value in A1, use:

=LEN(A1)-LEN(SUBSTITUTE(A1,"/",""))

this will give the count of slashes in the cell.

NOTE the data must be text and not a Date nor formulaic divide
--
Gary''s Student - gsnu200816


"Stephen Allen" wrote:

I am analysing some string data mostly for numeric values, but want to
remove those values that look like dates (e.g. 12/12/2008). Part of
the analysis means that I must count the number of occurrences on the
value "/" within the string.

Does anyone know of a function that would give me the count of the
number of instances of "/" or any other string portion?