+ Reply to Thread
Results 1 to 4 of 4

How to select Range in Mutiple Column to Last Row

Hybrid View

  1. #1
    Forum Contributor
    Join Date
    08-14-2012
    Location
    USA
    MS-Off Ver
    Excel 2007, MS 365 (Windows 10 Pro 64-bit)
    Posts
    818

    How to select Range in Mutiple Column to Last Row

    Hello All,
    I'm trying to select the below code but it didn't work. Please help

    Dim LRR1 As Long
        LRR1 = Cells(Rows.Count, 2).End(xlUp).Row
    Range("K18:O" & LRR1, "Q18:T" & LRR1, "Z18:Z" & LRR1, "AC18:AC" & LRR1, "AF18:AF" & LRR1, "AI18:AI" & LRR1, "AL18:AL" & LRR1).Select
    Regards,
    tt3
    Last edited by tuongtu3; 02-02-2013 at 04:22 AM. Reason: Solved

  2. #2
    Forum Expert
    Join Date
    12-10-2006
    Location
    Sydney
    MS-Off Ver
    Office 365
    Posts
    3,565

    Re: How to select Range in Mutiple Column to Last Row

    Hi tt3 (again )

    Try this:

    Range("K18:O" & LRR1 & ", Q18:T" & LRR1 & ",Z18:Z" & LRR1 & ",AC18:AC" & LRR1 & ",AF18:AF" & LRR1 & ",AI18:AI" & LRR1 & ",AL18:AL" & LRR1).Select
    Regards,

    Robert
    ____________________________________________
    Please ensure you mark your thread as Solved once it is. Click here to see how
    If this post helps, please don't forget to say thanks by clicking the star icon in the bottom left-hand corner of my post

  3. #3
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,645

    Re: How to select Range in Mutiple Column to Last Row

    This should do it.
    Dim LRR1 As Long
        LRR1 = Cells(Rows.Count, 2).End(xlUp).Row
        Range("K18:O" & LRR1 & ", Q18:T" & LRR1 & " , Z18:Z" & LRR1 & " , AC18:AC" & LRR1 & " , AF18:AF" & LRR1 & " , AI18:AI" & LRR1 & " , AL18:AL" & LRR1).Select
    If posting code please use code tags, see here.

  4. #4
    Forum Contributor
    Join Date
    08-14-2012
    Location
    USA
    MS-Off Ver
    Excel 2007, MS 365 (Windows 10 Pro 64-bit)
    Posts
    818

    Re: How to select Range in Mutiple Column to Last Row

    @Robert & Norie,
    Both codes are working great. Thank you very much for your time and help.

    Regards,
    tt3

+ 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