+ Reply to Thread
Results 1 to 3 of 3

Selecting Multiple Rows & Columns

Hybrid View

COLIN_303 Selecting Multiple Rows &... 04-29-2013, 09:35 AM
patel45 Re: Selecting Multiple Rows &... 04-29-2013, 09:43 AM
COLIN_303 Re: Selecting Multiple Rows &... 04-29-2013, 11:27 AM
  1. #1
    Registered User
    Join Date
    07-14-2011
    Location
    plymouth
    MS-Off Ver
    Excel 2003
    Posts
    26

    Selecting Multiple Rows & Columns

    Hi All

    I am Currently using the below code to select my data, which is then copied into other worksheets

    ActiveSheet.Range("$A$1:$M$" & ActiveSheet.Cells(1, 1).End(xlDown).Row).Select

    however up until now the number of columns has stayed the same, but now the number of columns has started to vary.

    I have tried to change the code so that it selects all but the last Column in the worksheet, but I have only managed to get to work for the 1 row. how do I get it to select all the rows?

    ActiveSheet.Range(Range("A1"), Range("A1").End(xlToRight).Offset(0, -1)).Select
    thanks in advance

    colin

  2. #2
    Forum Expert
    Join Date
    07-15-2012
    Location
    Leghorn, Italy
    MS-Off Ver
    Excel 2010
    Posts
    3,431

    Re: Selecting Multiple Rows & Columns

    ActiveSheet.UsedRange.Select
    If solved remember to mark Thread as solved

  3. #3
    Registered User
    Join Date
    07-14-2011
    Location
    plymouth
    MS-Off Ver
    Excel 2003
    Posts
    26

    Re: Selecting Multiple Rows & Columns

    Hi thanks for the response

    however i managed to Solve it myself by combining the two codes

    thanks

    ActiveSheet.Range("$A$1:$A$" & ActiveSheet.Cells(1, 1).End(xlDown).Row, Range("A1").End(xlToRight).Offset(0, -1)).Select

+ 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