+ Reply to Thread
Results 1 to 9 of 9

How do you select a range (using last row/last column)

Hybrid View

  1. #1
    Forum Contributor
    Join Date
    08-14-2013
    Location
    LA Baby!!
    MS-Off Ver
    Excel 2007
    Posts
    1,598

    How do you select a range (using last row/last column)

    Hello. How can I select the range that aligns with the last row and last column in this sheet? C2:E3 in attached sheet.
    Attached Files Attached Files

  2. #2
    Forum Expert nilem's Avatar
    Join Date
    10-22-2011
    Location
    Ufa, Russia
    MS-Off Ver
    2013
    Posts
    3,377

    Re: How do you select a range (using last row/last column)

    try so
    Range("A1").CurrentRegion.Select

  3. #3
    Forum Contributor
    Join Date
    08-14-2013
    Location
    LA Baby!!
    MS-Off Ver
    Excel 2007
    Posts
    1,598

    Re: How do you select a range (using last row/last column)

    That doesn't select the area that I want. I want C2:E3.

  4. #4
    Forum Expert nilem's Avatar
    Join Date
    10-22-2011
    Location
    Ufa, Russia
    MS-Off Ver
    2013
    Posts
    3,377

    Re: How do you select a range (using last row/last column)

    Quote Originally Posted by ammartino44 View Post
    I want C2:E3.
    With Range("A1").CurrentRegion
        .Offset(1, 2).Resize(.Rows.Count - 1, .Columns.Count - 2).Select
    End With

  5. #5
    Forum Contributor
    Join Date
    08-14-2013
    Location
    LA Baby!!
    MS-Off Ver
    Excel 2007
    Posts
    1,598

    Re: How do you select a range (using last row/last column)

    Nice Nilem. That's that good good.

  6. #6
    Forum Contributor
    Join Date
    08-14-2013
    Location
    LA Baby!!
    MS-Off Ver
    Excel 2007
    Posts
    1,598

    Re: How do you select a range (using last row/last column)

    And once I figure out how to select the range, how can I fill it with formulas like this. =SUMIFS(Master!$D$2:$D$5,Master!$C$2:$C$5,'101'!$B2,Master!$B$2:$B$5,'101'!C$1)

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

    Re: How do you select a range (using last row/last column)

    Maybe:

    Sub ammartino44z()
    Dim x As Long, y As Long, z As Long
    x = Range("A" & Rows.Count).End(3).row
    y = Cells(1, Columns.Count).End(xlToLeft).Column
    z = Range("C" & Rows.Count).End(3)(2).row
    Range(Cells(z, 3), Cells(x, y)).Select
    End Sub

  8. #8
    Forum Contributor
    Join Date
    08-14-2013
    Location
    LA Baby!!
    MS-Off Ver
    Excel 2007
    Posts
    1,598

    Re: How do you select a range (using last row/last column)

    @ John "Big" D. What does End(3) mean? And what does End(3)(2) mean? Danks.

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

    Re: How do you select a range (using last row/last column)

    End(3) - same as End(xlUp)
    End(3)(2) - same as End(xlUp).Offset(1)

+ 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. Sort Select Range: Either Find Column Header or Last Column:Last Row
    By mbryson in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 07-02-2014, 08:03 AM
  2. [SOLVED] Range or Column .Select?
    By piggypablo in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 03-14-2014, 10:32 AM
  3. [SOLVED] VBA: Select Range of Cells in one Column, Merge, and then proceed to Next Column
    By magasi in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 08-27-2013, 12:17 PM
  4. Replies: 4
    Last Post: 06-17-2013, 05:21 AM
  5. Select a range within a column
    By jomili in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 12-14-2010, 12:24 PM
  6. [SOLVED] Select column same row by range name
    By Kevryl in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-01-2006, 02:20 AM
  7. Select only one column/row in a range
    By Rutgers_Excels in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-07-2005, 04:48 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