Below is the code. It errors out on this line: ReDim Preserve nuArr(1 To c, 1 To 1) "Type mismatch"
Any help/comments will be much appreciated!
![]()
Sub vArr() Dim Arr1 As Variant Dim nuArr As Variant Arr1 = Sheet1.Range("A1:A10") For i = 1 To UBound(Arr1) If Arr1(i, 1) > 5 Then c = c + 1 ReDim Preserve nuArr(1 To c, 1 To 1) ' Trying to resize Array nuArr(c, 1) = Arr1(i, 1) End If Next Sheet1.Cells(1, 2).Resize(UBound(nuArr)) = nuArr End Sub
Bookmarks