looking across an array

Ted Hepworth

New Member
Joined
Sep 12, 2002
Messages
1
I have a block of data, x rows, y columns. I am trying to read across them one at a time using a macro. I can read across easily using a Do While/Loop routine but cannot get it to step down the rows. I have been trying to use an inner and an outer loop routines without success.
My ultimate goal is to do a Select Case function in each cell to build up a list of integer variable values when the whole array has been analysed.
 

Some videos you may like

Excel Facts

How to find 2nd largest value in a column?
MAX finds the largest value. =LARGE(A:A,2) will find the second largest. =SMALL(A:A,3) will find the third smallest

Juan Pablo González

MrExcel MVP
Joined
Feb 8, 2002
Messages
11,959
<pre>For i = 1 to y
for j = 1 to x
With Cells(i,j)
'Something here
End With
Next j
Next i</pre>

if this isn't what you want, what have you tried ?
 

Watch MrExcel Video

Forum statistics

Threads
1,118,921
Messages
5,575,043
Members
412,636
Latest member
XinZ
Top