+ Reply to Thread
Results 1 to 3 of 3

Select Defined Range if Selection

Hybrid View

  1. #1
    Forum Contributor
    Join Date
    12-19-2011
    Location
    Central Europe
    MS-Off Ver
    Excel O365
    Posts
    364

    Select Defined Range if Selection

    Hi all

    How can I get Excel to select range G to P on all selected cells?

    Example: User selects K5 and K10

    Result: The selection should be G5:P5 and G10:P10

    What I managed is to select the entire rows of the selectio, but how can I limit it to G to P?

    Selection.EntireRow.Select
    Last edited by FallingDown; 11-25-2014 at 06:20 AM.

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

    Re: Select Defined Range if Selection

    Perhaps.
    Intersect(Selection.EntireRow, Range("G:P")).Select
    If posting code please use code tags, see here.

  3. #3
    Forum Contributor
    Join Date
    12-19-2011
    Location
    Central Europe
    MS-Off Ver
    Excel O365
    Posts
    364

    Re: Select Defined Range if Selection

    Perfect! Thank you!

+ 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. VBA - Copying Rows upon selection within a Pre-Defined Range
    By ginja in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-26-2014, 02:28 PM
  2. [SOLVED] Range(Selection, Selection.End(xlDown)).Select goes to 65536 instead of last filled row
    By looney in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 06-12-2013, 10:51 AM
  3. Deselect selection if it's not within a defined range
    By Shanthan in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 03-31-2013, 11:10 AM
  4. Replies: 2
    Last Post: 04-20-2012, 12:23 PM
  5. VBA to select a defined range
    By Shawn in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 07-21-2005, 04:05 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