+ Reply to Thread
Results 1 to 6 of 6

Find two strings in a range select cells in between and loop through range

  1. #1
    Registered User
    Join Date
    04-05-2007
    Location
    Sydney Australia
    Posts
    48

    Find two strings in a range select cells in between and loop through range

    Hi

    I am using the below code to Find two strings in column A and select the cells between them.

    I would like to loop through the entire range as the two strings appear more than once.



    Please Login or Register  to view this content.
    Thanks for any assistance

    Jeff

  2. #2
    Forum Guru
    Join Date
    07-25-2011
    Location
    Florida
    MS-Off Ver
    Excel 2003
    Posts
    9,643

    Re: Find two strings in a range select cells in between and loop through range

    Please Login or Register  to view this content.
    Surround your VBA code with CODE tags e.g.;
    [CODE]your VBA code here[/CODE]
    The # button in the forum editor will apply CODE tags around your selected text.

  3. #3
    Registered User
    Join Date
    04-05-2007
    Location
    Sydney Australia
    Posts
    48

    Re: Find two strings in a range select cells in between and loop through range

    Brilliant

    Thank You AlphaFrog

  4. #4
    Registered User
    Join Date
    04-05-2007
    Location
    Sydney Australia
    Posts
    48

    Re: Find two strings in a range select cells in between and loop through range

    Hi Again

    This works perfectly however what would I need to edit if I want to use a partial match. I have tried changing xlWhole to xlPart but that doesn't want to work

    Please Login or Register  to view this content.

  5. #5
    Forum Guru
    Join Date
    07-25-2011
    Location
    Florida
    MS-Off Ver
    Excel 2003
    Posts
    9,643

    Re: Find two strings in a range select cells in between and loop through range

    Changing to xlPart is correct. Did you change all four?


    Please Login or Register  to view this content.

  6. #6
    Registered User
    Join Date
    04-05-2007
    Location
    Sydney Australia
    Posts
    48

    Re: Find two strings in a range select cells in between and loop through range

    Hi

    Sorry for taking so long to get back to you and no I hadn't edited correctly.

    All good now

    Thanks for your help

    Jeff

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] Loop thru all cells in range, find 1st match, move to next row - Help!
    By Justin H2O in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-09-2018, 10:28 AM
  2. [SOLVED] Help with loop to select range of cells that meet criteria
    By NU2vba in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 03-10-2016, 02:27 AM
  3. [SOLVED] Need VBA to find letter A in Column A:A, select range, popup MsgBox then loop
    By tuongtu3 in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 06-28-2015, 04:05 AM
  4. Need to loop to a ceretain value then select a range of cells
    By rosshkerr in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 05-28-2015, 08:28 AM
  5. Replies: 5
    Last Post: 08-17-2014, 09:51 PM
  6. Loop to select range of cells representing a month....
    By finlejb in forum Excel Programming / VBA / Macros
    Replies: 18
    Last Post: 02-02-2008, 08:00 PM
  7. [SOLVED] Loop through a range of cells to find unique entries
    By zoot in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 04-29-2006, 09:15 AM

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