+ Reply to Thread
Results 1 to 4 of 4

Contents Of A String

  1. #1
    Registered User
    Join Date
    03-16-2005
    Posts
    7

    Contents Of A String

    Is there any way of finding how often a particular character occurs in a particular string? I know how to find out whether it occurs at all and if so how far into it, but not how often.

  2. #2
    Forum Contributor
    Join Date
    06-23-2004
    Location
    Houston, TX
    Posts
    571
    Quote Originally Posted by andrewturek
    Is there any way of finding how often a particular character occurs in a particular string? I know how to find out whether it occurs at all and if so how far into it, but not how often.
    Try this ...

    =len(A1)-len(substitute(A1,"c",""))

    where cell A1 is where your string is entered and "c" is the character that you want to count in the string.

    Hope this helps.

    Regards.
    BenjieLop
    Houston, TX

  3. #3
    Registered User
    Join Date
    03-16-2005
    Posts
    7
    That's fantastic, thank you indeed. As always, obvious when you know how!

    Andrew

  4. #4
    Forum Contributor
    Join Date
    06-23-2004
    Location
    Houston, TX
    Posts
    571
    Quote Originally Posted by andrewturek
    That's fantastic, thank you indeed. As always, obvious when you know how!

    Andrew
    You are welcome ... thank you for the feedback.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1