Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How can I Insert the texts from cells into array(i)

Status
Not open for further replies.

yarondavid

Programmer
May 8, 2006
20
IL
I don't know how I can insert the texts from few cells into array(i) by Excel macro script.
In my part of Excel macro, I want to take some text from cells in column A from my "Summary" sheet and insert them into the elements of 'PlatformNames' array.

Dim PlatformNames(1 To 20) As String

With Workbooks("Acceptance_Tests_Summary_1.xls").Worksheets("Summary")
For i = 0 To 52
For j = 1 To 12
PlatformNames(j) = .Cells(i, A)
i = i + 4
j = j + 1
Next i
Next j
End With
 


Hi,

the FIRST value of i is ZERO. You cannot have a ROW ZERO

You have A as a VARIABLE that is probably EMPTY or equal to ZERO

i & j are in for..next Step 1 implied.

Why are you incrimenting i & j?

Code:
... =  .Cells(i, "A").value
/code]


Skip,
[sub]
[glasses] [b][red][/red][/b]
[b][/b] [tongue][/sub]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top