Home |
Search |
Today's Posts |
#11
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
That example is beyond the scope of the code. As the only comment in the
code indicates it works strictly on 1D arrays. Of course, one could easily argue that the definition of union in the example you present is not (array("a", "b"), "c",1,"b",2,3) but rather ("a","b","c",1,2,3) In any case... What you want to do is in fact a subset of a larger class of possible data sources: n-dimensional arrays or variants containing arrays of variants containing arrays of... While a solution can be created (I would use a recursive algorithm), it is not included in this code. The code also doesn't explicitly handle objects, either native or user-defined, or variables of a custom user type or.... Instead it relies on the default value, if any -- with the attendant and potentially unintended consequences. -- Regards, Tushar Mehta www.tushar-mehta.com Excel, PowerPoint, and VBA add-ins, tutorials Custom MS Office productivity solutions In article . com, says... Hello Tushar, what about Sub testUnion() Dim x, y, z, w x = Array(Array("a", "b"), "c") y = Array(1, "b") z = Array(1, 2, 3) w = VBAUnion(x, y, z) ? I would expect w to be = Array(Array("a", "b"), "c",1,"b",2,3) Right? But it is not. Regards, Bernd |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Problems using Union All | Excel Programming | |||
Undo a Union | Excel Programming | |||
union problem | Excel Programming | |||
how to union two array with same structure | Excel Programming | |||
Trouble with Union | Excel Programming |