Hi Forum Friends
I have a macro to reset certain column that are offset by 13 to the right.
If the test for the loop is ActiveCell = BLANK the macro works, but creates an
un needed column at the end.
If I test for a Blank cell before copying the formula the macro ends prematurely.
I am stumped.
Sub BClear()
x = 0
y = 0
If Left(Range("L38"), 3) = "M-X" Then
y = 8
Else
y = 13
End If
Range("F54:F100").Activate
Selection.Copy
Range("F54:F100").Offset(0, 10).Activate
ActiveSheet.Paste
Range("F40:F230").Activate
Selection.Copy
Do
x = x + y
Range("F40:F100").Offset(0, 10 + x).Activate
' ActiveCell.Offset(1, 0).Activate
ActiveSheet.Paste
Loop Until ActiveCell = BLANK 'works, but creates un-wanted column
Loop Until ActiveCell.Offset(0, 10 + x + y) = BLANK ' stops on column 107
Stop
End Sub
Merry Christmas
Al
Bookmarks