+ Reply to Thread
Results 1 to 7 of 7

Copy Union Range with VBA

  1. #1
    Forum Contributor
    Join Date
    07-13-2017
    Location
    Hong Kong
    MS-Off Ver
    MS Office 365
    Posts
    481

    Copy Union Range with VBA

    Hi all,

    I want to copy the dynamic Range ("A6:C6+b,F6:BS6+b") with code.

    Please Login or Register  to view this content.
    There's seems to be a syntax/with variable error... Can someone help?

  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: Copy Union Range with VBA

    Have you tried using Union?
    Please Login or Register  to view this content.
    If posting code please use code tags, see here.

  3. #3
    Forum Guru Sintek's Avatar
    Join Date
    12-04-2015
    Location
    Cape Town
    MS-Off Ver
    2013 | 2019 | 2021
    Posts
    15,077

    Re: Copy Union Range with VBA

    See Norie assisted...
    Please Login or Register  to view this content.
    Good Luck...
    I don't presume to know what I am doing, however, just like you, I too started somewhere...
    One-day, One-problem at a time!!!
    If you feel I have helped, please click on the [★ Add Reputation] to left of post window...
    Also....Add a comment if you like!!!!
    And remember...Mark Thread as Solved...
    Excel Forum Rocks!!!

  4. #4
    Forum Contributor
    Join Date
    07-13-2017
    Location
    Hong Kong
    MS-Off Ver
    MS Office 365
    Posts
    481

    Re: Copy Union Range with VBA

    Quote Originally Posted by Norie View Post
    Have you tried using Union?
    Please Login or Register  to view this content.
    Now it says: Error 1004. This action won't work on multiple selections.

  5. #5
    Forum Guru Sintek's Avatar
    Join Date
    12-04-2015
    Location
    Cape Town
    MS-Off Ver
    2013 | 2019 | 2021
    Posts
    15,077

    Re: Copy Union Range with VBA

    Or ... If you don't want to use Post3 suggestion then...
    Please Login or Register  to view this content.

  6. #6
    Forum Contributor
    Join Date
    07-13-2017
    Location
    Hong Kong
    MS-Off Ver
    MS Office 365
    Posts
    481

    Re: Copy Union Range with VBA

    Quote Originally Posted by sintek View Post
    Or ... If you don't want to use Post3 suggestion then...
    Please Login or Register  to view this content.
    Both your solutions seem to work! Thanks

  7. #7
    Forum Guru Sintek's Avatar
    Join Date
    12-04-2015
    Location
    Cape Town
    MS-Off Ver
    2013 | 2019 | 2021
    Posts
    15,077

    Re: Copy Union Range with VBA

    ..........................................
    Thanks.gif

+ 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- Copy and/or union certain cells
    By Johnatha in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 10-21-2014, 09:25 AM
  2. [SOLVED] Not getting how to write a Union Range
    By capson in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 05-22-2014, 09:54 AM
  3. Union Range Problem
    By LDwoods in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 05-19-2014, 09:45 PM
  4. [SOLVED] Range/union
    By Dibbley247 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 01-22-2013, 10:35 AM
  5. Formula in Range Union!!
    By blueangel2005 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 02-13-2008, 06:35 AM
  6. union range problem
    By Walter in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-12-2006, 07:35 PM
  7. Union/Range/Cells
    By KentÄ in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 03-11-2005, 08:06 AM

Tags for this Thread

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