Cells filling by array

Closed
Jiri - Aug 17, 2009 at 10:12 AM
Excelguru Posts 261 Registration date Saturday April 11, 2009 Status Member Last seen June 21, 2011 - Aug 18, 2009 at 07:26 AM
Hello,
i have a problem in Excel 2007 in VBA. I have this code (part):

Dim Oblast As Range
Set Oblast = Worksheets(2).Range("H1:H" & Poradi)
Oblast = Ceniky

Ceniky looks like:

Ceniky(1) = 1
Ceniky(2) = 2
Ceniky(3) = 301
Ceniky(4) = 302
etc.

But "Oblast (1 to 37) as long" is after this so:
Oblast.Formula(or Value2)(1,1) = 1
Oblast.Formula(2,1) = 1
Oblast.Formula(3,1) = 1
-> so in each cell ist value 1

Do you know why?

Thanks

Jiri

1 response

Excelguru Posts 261 Registration date Saturday April 11, 2009 Status Member Last seen June 21, 2011 307
Aug 18, 2009 at 07:26 AM
Put the complete procedure. What you put here is difficult to understand
0