I am running a macro that is designed to clean up unused lines in my template. The code does exactly what i want it to do... but it takes so darn to run it... i will probably end up with an answer before its done running. (LOL)..
Can anyone assist in the below code with a different way of going about what i did below that may result in quicker running?
Can anyone assist in the below code with a different way of going about what i did below that may result in quicker running?
Code:
Sub Clean_Up_CVG()
Application.ScreenUpdating = False
Application.Calculation = xlCalculationManual
Application.EnableEvents = False
RowA = 6
Do Until Len(Sheets("E-Mail").Range("B" & RowA).Value) = 0
If Sheets("E-Mail").Range("B" & RowA).Value = 0 Then
Sheets("E-Mail").Rows(RowA).Delete Shift:=xlUp
Else
Sheets("E-Mail").Rows(RowA).Value = Sheets("E-Mail").Rows(RowA).Value
RowA = RowA + 1
End If
Loop
RowA = 6
Do Until Len(Sheets("MON Summary").Range("B" & RowA).Value) = 0
If Sheets("MON Summary").Range("B" & RowA).Value = 0 Then
Sheets("MON Summary").Rows(RowA).Delete Shift:=xlUp
Else
Sheets("MON Summary").Rows(RowA).Value = Sheets("MON Summary").Rows(RowA).Value
RowA = RowA + 1
End If
Loop
RowA = 6
Do Until Len(Sheets("SCI Summary").Range("B" & RowA).Value) = 0
If Sheets("SCI Summary").Range("B" & RowA).Value = 0 Then
Sheets("SCI Summary").Rows(RowA).Delete Shift:=xlUp
Else
Sheets("SCI Summary").Rows(RowA).Value = Sheets("SCI Summary").Rows(RowA).Value
RowA = RowA + 1
End If
Loop
RowA = 6
Do Until Len(Sheets("CMON Summary").Range("B" & RowA).Value) = 0
If Sheets("CMON Summary").Range("B" & RowA).Value = 0 Then
Sheets("CMON Summary").Rows(RowA).Delete Shift:=xlUp
Else
Sheets("CMON Summary").Rows(RowA).Value = Sheets("CMON Summary").Rows(RowA).Value
RowA = RowA + 1
End If
Loop
RowA = 6
Do Until Len(Sheets("Specialty Summary").Range("B" & RowA).Value) = 0
If Sheets("Specialty Summary").Range("B" & RowA).Value = 0 Then
Sheets("Specialty Summary").Rows(RowA).Delete Shift:=xlUp
Else
Sheets("Specialty Summary").Rows(RowA).Value = Sheets("Specialty Summary").Rows(RowA).Value
RowA = RowA + 1
End If
Loop
RowA = 6
Do Until Len(Sheets("Brand Service Summary").Range("B" & RowA).Value) = 0
If Sheets("Brand Service Summary").Range("B" & RowA).Value = 0 Then
Sheets("Brand Service Summary").Rows(RowA).Delete Shift:=xlUp
Else
Sheets("Brand Service Summary").Rows(RowA).Value = Sheets("Brand Service Summary").Rows(RowA).Value
RowA = RowA + 1
End If
Loop
RowA = 6
Do Until Len(Sheets("Brand Sales Summary").Range("B" & RowA).Value) = 0
If Sheets("Brand Sales Summary").Range("B" & RowA).Value = 0 Then
Sheets("Brand Sales Summary").Rows(RowA).Delete Shift:=xlUp
Else
Sheets("Brand Sales Summary").Rows(RowA).Value = Sheets("Brand Sales Summary").Rows(RowA).Value
RowA = RowA + 1
End If
Loop
RowA = 6
Do Until Len(Sheets("Agent Summary").Range("B" & RowA).Value) = 0
If Sheets("Agent Summary").Range("B" & RowA).Value = 0 Then
Sheets("Agent Summary").Rows(RowA).Delete Shift:=xlUp
Else
Sheets("Agent Summary").Rows(RowA).Value = Sheets("Agent Summary").Rows(RowA).Value
RowA = RowA + 1
End If
Loop
Application.ScreenUpdating = True
Application.Calculation = xlCalculationAutomatic
Application.EnableEvents = True
End Sub