View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Arne Hegefors Arne Hegefors is offline
external usenet poster
 
Posts: 244
Default Read range to array

Hi! I have a range. I want to loop through the range and place the values
from the cells into an array. However i have some trouble with the code. I
write:

Set rngCorr = ThisWorkbook.Sheets("Counterparty").Range("FactorC orrRange")
NoR = rngCorr.Rows.Count
ReDim dblCorrArray(NoR)
'here are the different correlations for the factos set
For i = 0 To NoR
dblCorrArray(i) = Range("FactorCorrRange").Offset(i, 0).Value
Next

I ger error 13 incompatible types. How shall i write the code? pls help!