+ Reply to Thread
Results 1 to 3 of 3

Find position of all locations of given character in a string

  1. #1
    Registered User
    Join Date
    02-22-2007
    Posts
    3

    Find position of all locations of given character in a string

    Friends,

    I want to write a formula to find position of all locations of a given character in a string/cell. Find and Search functions give the first occurence of such location.

    Eg: If I have "Apple" in A1, I want my formula result as 2,3 if my search string is 'p". FIND("p",A1) will give 1. Search("p",A1) also gives 1.

    Can anyone help.

    Thanks

  2. #2
    Forum Contributor VBA Noob's Avatar
    Join Date
    04-25-2006
    Location
    London, England
    MS-Off Ver
    xl03 & xl 07(Jan 09)
    Posts
    11,988
    Try,

    =FIND("p",$A$1,COLUMN())

    Assumes formula in B2 and drag across

    VBA Noob
    _________________________________________


    Credo Elvem ipsum etian vivere
    _________________________________________
    A message for cross posters

    Please remember to wrap code.

    Forum Rules

    Please add to your signature if you found this link helpful. Excel links !!!

  3. #3
    Registered User
    Join Date
    02-22-2007
    Posts
    3

    Does not help

    The formula still gives position of first or next occurence. I want result as 2 and 3 at the same time.

+ 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