+ Reply to Thread
Results 1 to 2 of 2

Strings - Find position of the nth occurrence

  1. #1
    Registered User
    Join Date
    01-01-2005
    MS-Off Ver
    2007
    Posts
    368

    Strings - Find position of the nth occurrence

    Hi,

    I need a simple VBA code that finds the position of the nth ocuurence of a character in a string.

    Regards,
    Élio Fernandes

  2. #2
    Forum Expert mikerickson's Avatar
    Join Date
    03-30-2007
    Location
    Davis CA
    MS-Off Ver
    Excel 2011
    Posts
    6,229

    Re: Strings - Find position of the nth occurrence

    This will find the position of the 3rd "a" in A1

    =FIND(CHAR(5), SUBSTITUTE(A1, "a", CHAR(5), 3))
    _
    ...How to Cross-post politely...
    ..Wrap code by selecting the code and clicking the # or read this. Thank you.

+ 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