Text field

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a text field in a form that may contain 20 characters. (e.g.,
PPPPTTTUPPPTUPPTTUPP). I need to know whow many "P" are in the field.
Please help...

Thanks,
 
As it happens, this came up in another thread recently. It seems a number of
people have come up with this solution independently of each other, so with
thanks to all of them ...

? len("PPPPTTTUPPPTUPPTTUPP")-len(replace("PPPPTTTUPPPTUPPTTUPP","P",""))
11
 
Back
Top