+ Reply to Thread
Results 1 to 4 of 4

Select Range

Hybrid View

  1. #1
    Forum Contributor
    Join Date
    01-28-2013
    Location
    sweden
    MS-Off Ver
    Excel 2010
    Posts
    108

    Select Range

    Hi,

    Once again in trouble and I turn to the very helpful forum

    How do I write code to select rows 1:101 where column to select is defined as an variable. This clearly doesnt work,

    cells(1:101, MatchID).select
    But I think it is a good example to show what I like to do.

  2. #2
    Valued Forum Contributor fredlo2010's Avatar
    Join Date
    07-04-2012
    Location
    Miami, United States
    MS-Off Ver
    Excel 365
    Posts
    762

    Re: Select Range

    try this

    Cells(1, MatchID).Resize(101).Select

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

    Re: Select Range

    What is MatchID?

    If it's a column number and you want to select rows 1 to 101 of the column it represents try this.
    Intersect(Range("1:101"), Columns(MatchID)).Select
    If posting code please use code tags, see here.

  4. #4
    Forum Contributor
    Join Date
    01-28-2013
    Location
    sweden
    MS-Off Ver
    Excel 2010
    Posts
    108

    Re: Select Range

    Works like a charm So helpful this forum, thanks a lot!

+ 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. 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
  2. Replies: 4
    Last Post: 06-17-2013, 05:21 AM
  3. Define range to select from current cell in a full range (using worksheet_change)
    By draddy in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 01-07-2013, 11:48 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