+ Reply to Thread
Results 1 to 6 of 6

Select entire rows of range of active cells

  1. #1
    Registered User
    Join Date
    02-27-2007
    Location
    Jackson, MS
    MS-Off Ver
    365
    Posts
    96

    Select entire rows of range of active cells

    How do I select a range of entire rows from a range of cells that are activated? I don't know how much data goes in Column S below S2 but I want to autofit the height of the rows that have data in them. It has been sorted by Column S.

    Thank you!

    Please Login or Register  to view this content.

  2. #2
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,409

    Re: Select entire rows of range of active cells

    Try changing this:
    Please Login or Register  to view this content.
    to this:
    Please Login or Register  to view this content.
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  3. #3
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Select entire rows of range of active cells

    Hi,

    Sight of the workbook would have been useful.

    .Select code is rarely necessary, it just wastes time since VBA has to jump to Excel and back, perform an operation, in this case another .Select, jump back to VBA and then perform the final operation in Excel.

    The .CurrentRegion property of a range is often useful. Maybe

    Please Login or Register  to view this content.
    Richard Buttrey

    RIP - d. 06/10/2022

    If any of the responses have helped then please consider rating them by clicking the small star icon below the post.

  4. #4
    Registered User
    Join Date
    02-27-2007
    Location
    Jackson, MS
    MS-Off Ver
    365
    Posts
    96

    Re: Select entire rows of range of active cells

    This worked beautifully. thanks!!!

  5. #5
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,409

    Re: Select entire rows of range of active cells

    What worked beautifully? Mine, Richard's or both?



    If you are satisfied with the solution(s) provided, please mark your thread as Solved.


    New quick method:
    Select Thread Tools-> Mark thread as Solved. To undo, select Thread Tools-> Mark thread as Unsolved.

    Or you can use this way:

    How to mark a thread Solved
    Go to the first post
    Click edit
    Click Go Advanced
    Just below the word Title you will see a dropdown with the word No prefix.
    Change to Solved
    Click Save


    You may also want to consider thanking those people who helped you by clicking on the little star at the bottom left of their reply to your question.

  6. #6
    Registered User
    Join Date
    02-27-2007
    Location
    Jackson, MS
    MS-Off Ver
    365
    Posts
    96

    Re: Select entire rows of range of active cells

    Quote Originally Posted by TMS View Post
    What worked beautifully? Mine, Richard's or both?
    Yours did. I haven't tried the other yet.

+ 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] Select rows based on active range
    By scrabtree23 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-17-2020, 08:52 AM
  2. Need to copy/paste qualifying range of cells instead of entire rows
    By Royzer in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 12-12-2019, 09:12 AM
  3. Replies: 1
    Last Post: 11-09-2018, 01:16 AM
  4. Replies: 0
    Last Post: 03-15-2018, 10:21 AM
  5. Using offset function to select a range of cells based on active cell location
    By laxminarayana in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 12-25-2017, 07:49 AM
  6. [SOLVED] Naming an Excel Range for the entire active sheet
    By SoldOnTheRoad in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 07-21-2017, 11:27 AM
  7. [SOLVED] Select Entire Row of Active Cell
    By [email protected] in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 07-05-2013, 05:25 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