View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Demosthenes Demosthenes is offline
external usenet poster
 
Posts: 36
Default How do I create a function that counts number of cells in a series

For example, suppose you have the following data:

P
S
S
P
S
S
S
P
S
S

and you want to count how many "S"s repeat after each "P." That is, you're
looking for output:

"2s" = 2
"3s" = 1

Is there any way to write a function to do that?