+ Reply to Thread
Results 1 to 2 of 2

Recurrent Match Formula to Locate Multiple Instance of a String and Return Row Number

  1. #1
    Registered User
    Join Date
    01-25-2012
    Location
    Nashville, Tennessee
    MS-Off Ver
    Excel 2007
    Posts
    2

    Recurrent Match Formula to Locate Multiple Instance of a String and Return Row Number

    I need to write a macro that will return the column number of n instances of a string. The idea is to find the first instance of a particular string, return its row number and modify something using that row number, then using a for next loop use that row number as the new starting point to find the next instance, etc.

    Heres the code I have so far:
    Please Login or Register  to view this content.

    In this example I am finding every instance of Hello in Column A, the using the row number to modify the exact same row in Column B to say World. Then the for loop increments and the Match function starts from the row just below the previous instance of Hello.

    I just can't seem to get this to work right.

    Any help is greatly appreciated.

  2. #2
    Valued Forum Contributor
    Join Date
    06-17-2009
    Location
    Chennai,India
    MS-Off Ver
    Excel 2003,excel 2007
    Posts
    678

    Re: Recurrent Match Formula to Locate Multiple Instance of a String and Return Row Nu

    suppose data like this from A1 down

    1
    2
    3
    hello
    4
    5
    hello
    6
    7
    8
    hello
    9
    8
    7

    try this macro

    Please Login or Register  to view this content.
    I am not an expert. better solutions may be available
    [email protected]

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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