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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top