+ Reply to Thread
Results 1 to 2 of 2

loop backwards for searching a string

Hybrid View

  1. #1
    Registered User
    Join Date
    03-09-2012
    Location
    India
    MS-Off Ver
    Excel 2003
    Posts
    9

    loop backwards for searching a string

    Hi,

    I want to run the loop backwards in order to search a string. The requirement is as below:

    table.jpg

    Please check the attachment for the sample data

    I want to copy the rows from one sheet to another based on the string I am searching.
    Lets say if the string I am searching from example above is "hat" in column C and there is no value corresponding to it in cell B9, then a loop should start to search for value in column B starting from B9 till the cell where it finds some value which in this case would be in cell B5 and value is "KUY".

    I want to have the code for looping in reverse order.

    Any help would be much appreciated.

    Thanks,
    Abhimanyu
    Last edited by abhimaan; 07-15-2012 at 03:31 PM.

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

    Re: loop backwards for searching a string

    I have done something similar to your requirement. see the attached file "madnis.xls". If you see the cdoe(this is an event handler righcclick
    sheet1 tab and click view code.you can change this event handler as macro and modify to suit you
    if there is some doubt post back to newsgroup
    Attached Files Attached Files
    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