actually that approach is best with a for-each loop. But for a loop like this, i would probably just do the following.

Code:
 

For $I=2 to 464
For $J=2 to 453
$VS = $oXL.Cells($I,3).Value
$VY = $oYL.Cells($J,1).Value
If $VS=$VY
$oXL.Cells($I,6).Value=$oYL.Cells($J,4).Value
$oXL.Cells($I,4).Value=$oYL.Cells($J,2).Value
$J=453
EndIF
Next
Next




Shawn beat me to it.


Edited by maciep (2004-11-11 02:29 PM)
_________________________
Eric