View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.newusers
Gary''s Student Gary''s Student is offline
external usenet poster
 
Posts: 11,058
Default Counting a single value in a cell?

=LEN(B10)-LEN(SUBSTITUTE(B10,"-",""))

for data in B10
--
Gary''s Student - gsnu200789


"Greg" wrote:

I want to count how often a single value (the dash symbol) occurs in a
single cell than rank it. Showing two examples, AUS-IAH/PTY-IAH/AUS is in
cell A1 and
AUS-ORD-LHR/WAW-LHR-ORD/AUS is cell A2. Cell A1 has 2 dashes and A2 has 4
dashes. Is there a way to do this?

Thank you.