+ Reply to Thread
Results 1 to 5 of 5

Select two different ranges by offsetting values

  1. #1
    Registered User
    Join Date
    11-04-2010
    Location
    Denmark
    MS-Off Ver
    Excel 2007
    Posts
    12

    Select two different ranges by offsetting values

    Hi

    I need VBA to be able to select two different ranges in excel at the same time. This is an example of what I would need to select:

    Range("E6:P6,E4:P3").Select

    The problem is that I only have the starting cell e.g.

    Range("E5").Select.

    from that I need to get to the above selection by using "offset" or another solution. I have the number of columns etc. I need to get the right offset value.

    I've tried this:
    Please Login or Register  to view this content.
    But I get the message "Expected: List seperator or )"

    Any ideas?

    Thanks in advance
    Thomas

  2. #2
    Forum Expert millz's Avatar
    Join Date
    08-14-2013
    Location
    Singapore
    MS-Off Ver
    Excel, Access 2016
    Posts
    1,694

    Re: Select two different ranges by offsetting values

    Try

    Please Login or Register  to view this content.
    多么想要告诉你 我好喜欢你

  3. #3
    Forum Expert
    Join Date
    04-22-2013
    Location
    .
    MS-Off Ver
    .
    Posts
    4,418

    Re: Select two different ranges by offsetting values

    maybe try this:
    Please Login or Register  to view this content.

  4. #4
    Forum Expert
    Join Date
    04-22-2013
    Location
    .
    MS-Off Ver
    .
    Posts
    4,418

    Re: Select two different ranges by offsetting values

    Or maybe:
    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    11-04-2010
    Location
    Denmark
    MS-Off Ver
    Excel 2007
    Posts
    12

    Re: Select two different ranges by offsetting values

    Thanks both of you... All solutions seems to work exactly as intended - GREAT Impressive with such fast response!

    I'll try to see if I can find out how to give you all some points!

    Have a nice day!

+ 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. Accounting - Macro to delete offsetting values
    By betrayedslinky in forum Excel General
    Replies: 1
    Last Post: 05-29-2014, 11:42 AM
  2. Plotting: Offsetting series with same x axis values
    By x12179x in forum Excel General
    Replies: 1
    Last Post: 09-10-2011, 07:19 AM
  3. Select 2 ranges at once
    By davehunter in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 10-03-2007, 05:46 AM
  4. Replies: 2
    Last Post: 08-13-2007, 03:28 PM
  5. offsetting values of multiple cells!
    By via135 in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 07-18-2006, 01:20 AM

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