hi,
i want to take an array and transpose it but am having issues. the problem appears to be the size of the array, does anyone know a fix?
Sub stochastic()
'commutation functions
Dim surv(1 To 100000) As Double
Dim survv(1 To 100) As Double
Dim i As Long, j As Long
For i = 1 To 10000
If i > 99 Then
j = 99
Else
j = i
End If
surv(i) = Rnd
survv(j) = Rnd
Next i
Range("b2:b10000") = Application.Transpose(surv) 'error type mismatch
Range("b2:b100") = Application.Transpose(survv) 'no error
end sub
i want to take an array and transpose it but am having issues. the problem appears to be the size of the array, does anyone know a fix?
Sub stochastic()
'commutation functions
Dim surv(1 To 100000) As Double
Dim survv(1 To 100) As Double
Dim i As Long, j As Long
For i = 1 To 10000
If i > 99 Then
j = 99
Else
j = i
End If
surv(i) = Rnd
survv(j) = Rnd
Next i
Range("b2:b10000") = Application.Transpose(surv) 'error type mismatch
Range("b2:b100") = Application.Transpose(survv) 'no error
end sub