Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I have this looping macro that work like a gem. But it has
one glich or thing I would like to fix. When the macro is running and it encounters a empty cell I want it to stop running in the coloum it started in, move to the top of the worksheet, move over 9 cells and start agian. Can anyone help me see the light on this. Do ActiveCell.Name = "Sort2" ActiveCell.Offset(0, 6).Range("A1").Select ActiveCell.Name = "Sort3" Range("Sort2:Sort3").Select Selection.Sort Key1:=Range("Sort2"), Order1:=xlAscending, Orientation:=xlLeftToRight Range("Sort2").Select Application.CutCopyMode = False ActiveWorkbook.Names("Sort2").Delete ActiveWorkbook.Names("Sort3").Delete ActiveCell.Offset(1, 0).Select If Empty Then Exit Do Loop End Sub The if Empty does nothing, the loop contiues to the last row of the spread sheet. Pete |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Macro looping? | Excel Worksheet Functions | |||
Looping Macro | Excel Discussion (Misc queries) | |||
Looping Macro | Excel Discussion (Misc queries) | |||
Looping macro | Excel Worksheet Functions | |||
Looping a macro | Excel Discussion (Misc queries) |