+ Reply to Thread
Results 1 to 4 of 4

VBA String Needed to Select Range

  1. #1
    Registered User
    Join Date
    12-14-2010
    Location
    Texas,United Stated
    MS-Off Ver
    Excel 2007
    Posts
    63

    VBA String Needed to Select Range

    I need the VBA string that will do the following:

    Find the last used cell in Column M
    Go to the Cell in Column A of that row
    Select Range from that cell to cell in Column X

    Example:
    If the last used cell in column M is "M136"
    Range("A136:X136").Select

    Thanks In Advance,

    JBMERREL
    Last edited by jbmerrel; 05-03-2012 at 12:57 PM.

  2. #2
    Valued Forum Contributor
    Join Date
    03-25-2004
    Location
    Boston, MA US
    Posts
    1,094

    Re: VBA String Needed to Select Range

    Hi,
    Try this:
    Sub FindRng()
    LastRow = Range("M" & Rows.Count).End(xlUp).Row
    Range("A" & LastRow & ":X" & LastRow).Select
    End Sub

    HTH,

    Steve

  3. #3
    Registered User
    Join Date
    12-14-2010
    Location
    Texas,United Stated
    MS-Off Ver
    Excel 2007
    Posts
    63

    Re: VBA String Needed to Select Range

    Your the best Steve. Thanks A million!!!

  4. #4
    Forum Expert
    Join Date
    06-26-2010
    Location
    Austin, TX
    MS-Off Ver
    Excel 2010
    Posts
    1,673

    Re: VBA String Needed to Select Range

    Something a little different:

    range("M" & rows.Count).End(xlUp).offset(0,-12).Resize(1,24).Select

    Pauley

+ 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