Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
For loop...
Hello,
I have a single worksheet, with an unknown number of rows/columns. Essentially, I would like to go through each non-empty line and based on a value in any one of the columns, perform some action, like this (pseudocode): For i = 2 to (max number of rows) //if Ax (x=column) is empty/null, there are no more 'records' { if Ci = 1 copy entire row i to Worksheet 2 if Ci = 2 copy entire row i to Worksheet 3 if (Ci = 3 AND Di = 4) copy entire row i to Worksheet 4 else copy entire row i to Worksheet 5 } I'm missing something simple, but can't figure out what the easiest way to loop through all records. Any help would be appreciated. Regards, Alan |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
for each loop | Excel Discussion (Misc queries) | |||
Find loop doesn't loop | Excel Discussion (Misc queries) | |||
while loop | Excel Worksheet Functions | |||
help with a loop | Excel Discussion (Misc queries) | |||
Loop help | Excel Discussion (Misc queries) |