I'm trying to delete just A:_ & B:_ and move up if B:_ is empty. This works for the first sheet but then the second sheet stalls and I eventually have to shut down the program. Here is what I have so far.
Sub SStep2()
Sheets("1st").Select
Dim I As Long
Dim FIRSTROW As Long
Dim LASTROW As Long
Application.ScreenUpdating = False
FIRSTROW = ActiveSheet.UsedRange.Rows.Row
LASTROW = ActiveSheet.UsedRange.Rows.Count + ActiveSheet.UsedRange.Rows.Row - 1
For I = LASTROW To FIRSTROW Step -1
If (Cells(I, "B") = "") Then
Range(Cells(I, "A"), Cells(I, "B")).Delete Shift:=xlUp
End If
Next I
Application.ScreenUpdating = True
Sheets("2nd").Select
Application.ScreenUpdating = False
FIRSTROW = ActiveSheet.UsedRange.Rows.Row
LASTROW = ActiveSheet.UsedRange.Rows.Count + ActiveSheet.UsedRange.Rows.Row - 1
For I = LASTROW To FIRSTROW Step -1
If (Cells(I, "B") = "") Then
Range(Cells(I, "A"), Cells(I, "B")).Delete Shift:=xlUp
End If
Next I
Application.ScreenUpdating = True
Sheets("3rd").Select
Application.ScreenUpdating = False
FIRSTROW = ActiveSheet.UsedRange.Rows.Row
LASTROW = ActiveSheet.UsedRange.Rows.Count + ActiveSheet.UsedRange.Rows.Row - 1
For I = LASTROW To FIRSTROW Step -1
If (Cells(I, "B") = "") Then
Range(Cells(I, "A"), Cells(I, "B")).Delete Shift:=xlUp
End If
Next I
Application.ScreenUpdating = True
End Sub
Sub SStep2()
Sheets("1st").Select
Dim I As Long
Dim FIRSTROW As Long
Dim LASTROW As Long
Application.ScreenUpdating = False
FIRSTROW = ActiveSheet.UsedRange.Rows.Row
LASTROW = ActiveSheet.UsedRange.Rows.Count + ActiveSheet.UsedRange.Rows.Row - 1
For I = LASTROW To FIRSTROW Step -1
If (Cells(I, "B") = "") Then
Range(Cells(I, "A"), Cells(I, "B")).Delete Shift:=xlUp
End If
Next I
Application.ScreenUpdating = True
Sheets("2nd").Select
Application.ScreenUpdating = False
FIRSTROW = ActiveSheet.UsedRange.Rows.Row
LASTROW = ActiveSheet.UsedRange.Rows.Count + ActiveSheet.UsedRange.Rows.Row - 1
For I = LASTROW To FIRSTROW Step -1
If (Cells(I, "B") = "") Then
Range(Cells(I, "A"), Cells(I, "B")).Delete Shift:=xlUp
End If
Next I
Application.ScreenUpdating = True
Sheets("3rd").Select
Application.ScreenUpdating = False
FIRSTROW = ActiveSheet.UsedRange.Rows.Row
LASTROW = ActiveSheet.UsedRange.Rows.Count + ActiveSheet.UsedRange.Rows.Row - 1
For I = LASTROW To FIRSTROW Step -1
If (Cells(I, "B") = "") Then
Range(Cells(I, "A"), Cells(I, "B")).Delete Shift:=xlUp
End If
Next I
Application.ScreenUpdating = True
End Sub