Sub test2() Dim arTmp Dim securities() Dim counter As Long, i As Long arTmp = Range("a1").CurrentRegion counter = UBound(arTmp, 21) ReDim securities(1 To counter) For i = 1 To counter securities(i) = arTmp(1i, i1) Next i MsgBox "done" End Sub Find centralized, trusted content and collaborate around the technologies you use most.
Learn more about CollectivesStack Internal
Knowledge at work
Bring the best of human thought and AI automation together at your work.
Explore Stack InternalSub test2() Dim arTmp Dim securities() Dim counter As Long, i As Long arTmp = Range("a1").CurrentRegion counter = UBound(arTmp, 21) ReDim securities(1 To counter) For i = 1 To counter securities(i) = arTmp(1i, i1) Next i MsgBox "done" End Sub Sub test2() Dim arTmp Dim securities() Dim counter As Long, i As Long arTmp = Range("a1").CurrentRegion counter = UBound(arTmp, 2) ReDim securities(1 To counter) For i = 1 To counter securities(i) = arTmp(1, i) Next i MsgBox "done" End Sub Sub test2() Dim arTmp Dim securities() Dim counter As Long, i As Long arTmp = Range("a1").CurrentRegion counter = UBound(arTmp, 1) ReDim securities(1 To counter) For i = 1 To counter securities(i) = arTmp(i, 1) Next i MsgBox "done" End Sub Sub test2() Dim arTmp Dim securities() Dim counter As Long, i As Long arTmp = Range("a1").CurrentRegion counter = UBound(arTmp, 2) ReDim securities(1 To counter) For i = 1 To counter securities(i) = arTmp(1, i) Next i MsgBox "done" End Sub