count (i) while looping - help!
I'm trying to loop through an excel spreadsheet. I have alot of my code down pat except for this one piece. I can't figure out how to get the data from within a loop so that I can see what is in A1, A2, A3, ...
This is what I have for code (for that portion):
NOTE: i is set to start out as 1
Set MyColumns_Range = Range(wsData.Cells(1, "A"), wsData.Cells(1, "A").End(xlDown))
For Each c In MyColumns_Range
fund = Range("A" + i).Value
trans_type = Range("B" + i).Value
security_id = Range("C" + i).Value
shares = Range("E" + i).Value
Obviously the "A" + i is not going to be read as A1 or A2 but I can't figure out how to change it so that it IS read as A1 or A2, etc...any ideas?
|