Results 1 to 8 of 8

Explain Union and delRange to me.

Threaded View

  1. #1
    Registered User
    Join Date
    04-25-2014
    Location
    NYC, NY
    MS-Off Ver
    Excel 2010
    Posts
    44

    Explain Union and delRange to me.

    Is there any difference using
     Application.Union(ActiveCell, Range("A" & i))
    as opposed to
     Union(ActiveCell, Range("A" & i))
    Also, I read that in Excel 2003, if the parameter/cell contains nothing within the Union, then that parameter is not selected. Is this still true in Excel 2010 onwards?

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

    What exactly is
     delRange
    I couldn't really find any documentation on it explaining it in detail. All I could glean is that it is used to set a range to delete.

    For example:
      If Cells(16, i).Value = "Help" Then
                    If delRange Is Nothing Then
                        Set delRange = .Columns(i)
                    Else
                        Set delRange = Union(delRange, .Columns(i))
    This code actually deletes it :
     If Not delRange Is Nothing Then delRange.Delete
    I'm assuming that if delRange has not nothing (aka has columns saved), then delete the range.

    From what I understand, if the value is "Help" and delRange is not set, then set it to Column i. I don't really follow the part after the "Else". Does it mean that if there is already a delRange, then combine the previous delRange and the new Column i (which is repeated later on using next i code) together to be deleted later?

    Also: bonus points if you can tell me what "Call" does. To me, it just seems similar to ".Select" but is it just used for functions?
    Last edited by jhuang5132; 09-08-2014 at 11:24 AM.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] union cells
    By max_max in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 10-16-2013, 02:28 PM
  2. VBA - Help with Union All
    By JohnM3 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-31-2011, 05:14 PM
  3. Compiling a Union
    By Warbe in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 08-22-2011, 12:00 PM
  4. Union
    By Arne Hegefors in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-24-2006, 11:30 AM
  5. [SOLVED] UNION of Arrays - is possible?
    By Marina Limeira in forum Excel General
    Replies: 1
    Last Post: 01-22-2006, 08:40 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