PDA

View Full Version : Using arrays in vba excell



progfrog
07-15-2010, 02:08 PM
Hi guys!
Hi guys I have a loop that pulls out data from a column according to a certain value in the a specific row .
I get several values from that column (after pulling operation) - and i would like to keep them in an array
each value that comes up in one loop iteration should be saved in each array cell.
what is the right syntax for that?

thanx!
thanx!

Bob Phillips
07-15-2010, 03:05 PM
Redim ary(1 To 1)
NextItem = 0
For Each cell In Selection

If cell.Value2 > 10 Then

NextItem = NextItem + 1
Redim Preserve ary(1 To NextItem)
ary(NextItem) = cell.Value2
End If
Next cell