Hi,
You don't want to loop through each item in the array, only each row, so you can do something like this
Sub morearrays()
Dim lrow As Long
Dim secondarray() As Variant
Dim x As Long
lrow = Cells(Rows.Count, 1).End(xlUp).Row
secondarray = Range("a2:b" & lrow).Value
For x = 1 to Ubound(secondarray, 1)
Cells(x + 1, "c").Value = secondarray(x, 1) & " " & secondarray(x, 2)
Next
End Sub
It would be more efficient to write the results into another array and load that into column C at the end
Sub morearrays()
Dim lrow As Long
Dim secondarray() As Variant
Dim thirdArray()
Dim x As Long
lrow = Cells(Rows.Count, 1).End(xlUp).Row
secondarray = Range("a2:b" & lrow).Value
' resize new array to same number of rows and one column
Redim thirdArray(1 to ubound(secondarray, 1), 1 to 1)
For x = 1 to Ubound(secondarray, 1)
' load into array instead of cells
thirdArray(x, 1) = secondarray(x, 1) & " " & secondarray(x, 2)
Next
' now populate column C
Range("C2:C" & lrow).Value = thirdArray
End Sub
Bookmarks