+ Reply to Thread
Results 1 to 5 of 5
  1. #1
    Registered User
    Join Date
    11-19-2008
    Location
    wisconsin
    Posts
    2

    Select large non-contiguous range

    I have two non-adjacent columns with 7620 items in each. How can I select columns this long faster than scrolling down 7620 rows while holding the shift key? Is there a way to just specify the range of each column, using
    Code:
    (a1:a7620, g1:g7620)
    for example to do a scatter plot?
    Last edited by shg; 11-22-2008 at 05:21 PM. Reason: thread title

  2. #2
    Forum Moderator shg's Avatar
    Join Date
    06-21-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2007
    Posts
    25,134
    Select A1, Ctrl+Shift+Down, hold down the Ctrl key, select G1, Ctrl+Shift+Down

    I've edited your thread title. Please take a few minutes to read the Forum Rules about thread titles before starting your next thread.
    Microsoft MVP - Excel
    Entia non sunt multiplicanda sine necessitate

  3. #3
    Registered User
    Join Date
    11-19-2008
    Location
    wisconsin
    Posts
    2
    shg,

    Thank you very much! I just registered today and that was my very first thread. I was very excited to get a reply back so soon. I can see why the thread title is better with your editing. I had read the rules on titles but I'm sure will learn a lot from those who have done this more.

    Best regards,

    kellywa

  4. #4
    Valued Forum Contributor
    Join Date
    04-21-2007
    Location
    Lima, Peru
    MS-Off Ver
    2000, 2007, 2010
    Posts
    656

    Selecting Non contiguous range

    HI

    You could code it in VBA with something like the following

    Code:
    Sub select_noncontig()
    
    Range("a1:a7620,g1:g7620").Select
    
    End Sub
    To use the code it must be placed in A module in the VBE, press Alt + F11 to bring up the Visual Basic Editor , right click anywhere in the VBAProject for the relevant workbook and select Insert/Module. The code can now be pasted into the module.

    To simplify things you could assign a shortcut key

    Press Alt + F8 to bring up the macro dialog
    Select the macro
    Click on options
    Then enter whatever letter suits you and click OK
    Close the macro dialog and press Ctrl + the designated letter, the macro should now execute.

    If this is a bit unclear I will explain in more detail.

    Regards


    Jeff
    Attached Files Attached Files

  5. #5
    Forum Moderator shg's Avatar
    Join Date
    06-21-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2007
    Posts
    25,134
    You're welcome.

    Would you please mark the thread as solved?

    ------------------------------------------------

    To mark a thread as solved:

    Click the Edit button on your first post in the thread

    Click Go Advanced, select [SOLVED] from the Prefix dropdown, then click Save Changes

    If more than two days have elapsed since your first post, ask a moderator to mark it.
    Microsoft MVP - Excel
    Entia non sunt multiplicanda sine necessitate

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.2.0