The UNION function will return the unique values from two arrays, removing any duplicate values between the two arrays. The two arrays will have to be of the same data type.


Syntax


UNION([x,x,x,x,x],[y,y,y,y,y])


Parameters


x = An array of either numbers, dates or text.


y = An array of either numbers, dates or text.


Data Type Returned


Depending on the arrays entered by the user, it will return the corresponding data type, either numbers, dates or text.


Examples


UNION([1,2,3], [2,4]) will return [1,2,3,4].


UNION([1,1,2,3], [2,4]) will return [1,2,3,4].


UNION([‘a’,’b’,’c’], [‘d’,’e’]) will return [a,b,c,d,e].


UNION([1,1,2,3], []) will return [1,2,3].