Thread: Help With Loop
View Single Post
  #2   Report Post  
Nick Hodge
 
Posts: n/a
Default

Denis

This should work

Sub Finale()
Dim iLastCol As Integer, x As Integer
iLastCol = Range("IV2").End(xlToLeft).Column
For x = 2 To iLastCol
Range(Cells(2, x), Cells(11, x)).Select
'your routines here
Next x
End Sub

--
HTH
Nick Hodge
Microsoft MVP - Excel
Southampton, England
HIS


"Dennis" wrote in message
om...
Using this macro....

Sub Finale()
Range("B2:B11").Select
Application.Run "Move2help"
Application.Run "Drop3"
Application.Run "MoveTotal7"
Application.Run "Clean"
End Sub

What I'm trying to get to work is after the Clean macro runs I want to
Loop
back to the beginning and instead of Range("B2:B11").Select I want to
Select
the same Row range but one column to the right, so Range("C2:C11").Select.
Then I would like it to keep looping while incrementing up one Column each
Loop but keeping the same row range (2:11). I would like the Loop to stop
when
it gets to a Column where there is no Data, So if there was data in L2:L11
but
none in M2:M11 the Macro will quit when it hits M.

TIA, Dennis
===================