+ Reply to Thread
Results 1 to 5 of 5

Opposite of range.union?

  1. #1
    Forum Contributor
    Join Date
    10-25-2011
    Location
    Preston, England
    MS-Off Ver
    Excel 2016
    Posts
    136

    Opposite of range.union?

    I use "union" to combine two ranges

    Please Login or Register  to view this content.
    Is a way to remove one range from another range?

  2. #2
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2403 Win 11 Home 64 Bit
    Posts
    23,811

    Re: Opposite of range.union?

    Not understanding your issue. Can you post an example of what you have and what you want? Perhaps a real life example will be clearer.
    Alan עַם יִשְׂרָאֵל חַי


    Change an Ugly Report with Power Query
    Database Normalization
    Complete Guide to Power Query
    Man's Mind Stretched to New Dimensions Never Returns to Its Original Form

  3. #3
    Forum Contributor
    Join Date
    10-25-2011
    Location
    Preston, England
    MS-Off Ver
    Excel 2016
    Posts
    136

    Re: Opposite of range.union?

    Please Login or Register  to view this content.
    oRng.Address = "$A$1:$A$2"

    I want to remove one range from another so something like the union function but opposite. I don't want to add one range to another I want to remove one range from the other

    Please Login or Register  to view this content.
    nRng.Address = "$A$2"

  4. #4
    Forum Expert MickG's Avatar
    Join Date
    11-23-2007
    Location
    Banbury,Oxfordshire
    Posts
    2,650

    Re: Opposite of range.union?

    If the 2 ranges are not contiguous then you can user the Range "Areas" property to do this:-
    Please Login or Register  to view this content.
    Regards Mick

  5. #5
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,419

    Re: Opposite of range.union?

    Perhaps this article on a user function Subtract may help.

    http://dailydoseofexcel.com/archives...-and-subtract/
    Cheers
    Andy
    www.andypope.info

+ 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. [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
  2. Union Range Problem
    By LDwoods in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 05-19-2014, 09:45 PM
  3. [SOLVED] Union non-contiguous range
    By cokillerliu in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 05-02-2013, 10:38 AM
  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. [SOLVED] union range problem
    By Walter in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-12-2006, 07:35 PM
  7. [SOLVED] Union/Range/Cells
    By KentÄ in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 03-11-2005, 08:06 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