0

I am using a function to extract numbers from string , then split it’s values into a range.
I need if possible to insert the values into Target without Loop Target.
Grateful for your help.

Dim arr
arr = Split(ExtractNumbers(str)) 'ExtractNumbers is a Function ,str is a string
 
For n = 0 To UBound(arr)
   Target.Offset(n) = arr(n)
Next n
Leedo
  • 439
  • 5
  • 18
  • 2
    `Target.Resize(UBound(arr) + 1).Value = Application.Transpose(arr)`. `Split` returns a 1D array, so use `Transpose` when writing to the sheet. – BigBen Aug 02 '22 at 14:27
  • 1
    Transpose does have a limit of around 65k rows, but I assume it's appropriate for your setup. – BigBen Aug 02 '22 at 14:41

0 Answers0