|
-
Jun 27th, 2002, 09:40 AM
#1
Thread Starter
Lively Member
i would suggest two arrays...one that contains the cell locations that you're wanting to read from, and a second to hold the values. something like the following:
<code>
option base 1
option explicit
dim ws as worksheet, aRows as variant, _
aValues(30) as variant, _
iCol as integer
iCol = 2 'column number that contains data for array
set ws = sheets("name")
aRows = array(5,8,11,14)
for i=1 to ubound(aRows)
aValues(i) = ws.cells(aRows(i),iCol)
next
</code>
I'm a little rusty on my syntax, and I haven't actually run this code...so apologies for any errors. If the columns change also, you should be able to make an array for those too.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|