Any easier way than looping on ranges

B

Billabong

Hi,

My problem goes like this. I have 5 tables within a sheet.

Each table consist of variable no of columns where recordsar
inputted.

Each table is separated from another tables by a variable no of column
with "blank" records.

Is there any way I can improve on the following code (I find it to
slow)?


StartC1 = m

Do
'<expression1......
StartC1 = StartC1 + 1
Loop Until Cells(Rowi, StartC1).Value = Empty

StartC2 = StartC1

Do
'<expression1......
StartC2 = StartC2 + 1
Loop Until Cells(501, StartC2).Value <> Empty

StartC3 = StartC2
Do
'<expression1......
StartC3 = StartC3 + 1
Loop Until Cells(501, StartC3).Value = Empty

etc....

StartC2 = StartC2 - 1



More Power!!!

BR,
Billabon
 
N

Nikos Yannacopoulos

Selection.End(xlToRight).Select

will do what Ctrl+RightArrow does. It should speed it up spectacularly.

HTH,
Nikos
 
Top