+ Reply to Thread
Results 1 to 4 of 4

VBA Select End of Range

Hybrid View

  1. #1
    Registered User
    Join Date
    03-31-2014
    Location
    England
    MS-Off Ver
    Excel 2010
    Posts
    4

    VBA Select End of Range

    Hello all,

    I am looking for a code that selects the last cell of a pasted range. Within excel you can do this with Shift+Enter shortcut so I'm basically looking to do this with a vba code.

    Thank you,

    Yusuf

  2. #2
    Forum Expert
    Join Date
    06-12-2012
    Location
    Ridgefield Park, New Jersey
    MS-Off Ver
    Excel 2003,2007,2010
    Posts
    10,241

    Re: VBA Select End of Range

    Maybe:

    Sub Yusuf_Ali()
    Cells(Selection.Rows.Count, Selection.Column).Select
    End Sub

  3. #3
    Registered User
    Join Date
    03-31-2014
    Location
    England
    MS-Off Ver
    Excel 2010
    Posts
    4

    Re: VBA Select End of Range

    Quote Originally Posted by JOHN H. DAVIS View Post
    Maybe:

    Sub Yusuf_Ali()
    Cells(Selection.Rows.Count, Selection.Column).Select
    End Sub
    Perfect, exactly what I was looking for! Thank you very much for help John.

  4. #4
    Forum Expert
    Join Date
    06-12-2012
    Location
    Ridgefield Park, New Jersey
    MS-Off Ver
    Excel 2003,2007,2010
    Posts
    10,241

    Re: VBA Select End of Range

    You're welcome. Glad to help out and thanks for the feedback. Please mark this thread as solved.

+ 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. .select method with worksheets object ex. Sheets("Sheet1").range.select fail
    By RobCan in forum Excel Programming / VBA / Macros
    Replies: 13
    Last Post: 12-19-2014, 07:01 PM
  2. Newbie: Auto Select/un-Select an Range of Slicer Items
    By luckyali in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 06-23-2014, 09:52 AM
  3. Replies: 4
    Last Post: 06-17-2013, 05:21 AM
  4. send to range, popup box to input what the range should be each time/select range
    By lax2734 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-26-2012, 01:37 AM
  5. Code to select range and open a user form is opening the wrong range
    By rrbest in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 11-05-2010, 12:34 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