+ Reply to Thread
Results 1 to 7 of 7

Search Range for cell that begins with "Pri"

Hybrid View

  1. #1
    Forum Guru xladept's Avatar
    Join Date
    04-14-2012
    Location
    Pasadena, California
    MS-Off Ver
    Excel 2003,2010
    Posts
    12,378

    Re: Search Range for cell that begins with "Pri"

    Try this:

    Sub Scabtree(): Dim r As Long
             r = 99:    Do
        If LCase(Left(Cells(r, 1), 3)) = "pri" Then _
            Cells(r, 1).Select: Exit Sub
                r = r - 1: Loop Until r = 0
    End Sub
    If I've helped you, please consider adding to my reputation - just click on the liitle star at the left.

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~(Pride has no aftertaste.)

    You can't do one thing. XLAdept

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~aka Orrin

  2. #2
    Forum Contributor
    Join Date
    07-27-2012
    Location
    Somerset, Kentucky
    MS-Off Ver
    Excel 2007
    Posts
    123
    Thanks. I just gave A100 as an example. The active cell could be any cell in column A. Sorry for the trouble/lack of clarity.

+ 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. Replies: 0
    Last Post: 03-21-2014, 09:58 AM
  2. advanced filter criteria "begins with" and "does not begin with"
    By Eddie O in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 09-06-2005, 12:05 PM
  3. [SOLVED] advanced filter criteria "begins with" and "does not begin with"
    By Eddie O in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 09-06-2005, 04:05 AM
  4. [SOLVED] advanced filter criteria "begins with" and "does not begin with"
    By raph_baril in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 01:05 AM
  5. Backup to specific folder if workbook names begins with "NSR" or "MAC"
    By GregR in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 05-05-2005, 08:06 PM

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