Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
One way,
Sub test() Dim i As Long, e As Long Dim s As String Dim arr1, arr2 arr1 = Array(1, 2, 3, 4) arr2 = Array("A", "B", "C", "D", "E", "F") e = UBound(arr1) - LBound(arr1) + 1 e = e + UBound(arr2) - LBound(arr2) + 1 ReDim arr3(0 To e - 1) e = -1 For i = LBound(arr1) To UBound(arr1) e = e + 1 arr3(e) = arr1(i) Next For i = LBound(arr2) To UBound(arr2) e = e + 1 arr3(e) = arr2(i) Next For i = LBound(arr3) To UBound(arr3) s = s & arr3(i) Next Debug.Print s End Sub Regards, Peter T "Danny" wrote in message ... Hi, I have 2 (or more) arrays, how can i combine them into 1? example: Array 1 = "1, 2, 3, 4" Array 2 = "A, B, C, D, E, F" Result: Array_Combined = "1, 2, 3, 4, A, B, C, D, E, F" br, Danny |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Prevent cell/array references from changing when altering/moving thecell/array | Excel Discussion (Misc queries) | |||
Redimming an array dynamically assigned from range (how to redim first dimension of a 2-D array? /or/ reverse the original array order) | Excel Programming | |||
meaning of : IF(Switch; Average(array A, array B); array A) | Excel Worksheet Functions | |||
Array problem: Key words-Variant Array, single-element, type mismatch error | Excel Programming | |||
Array problem: Key words-Variant Array, single-element, type mismatch error | Excel Programming |