|
|
|
Dim LastRow As Long |
LastRow = Sheets("IMPROPER DETAIL").Cells(Rows.Count, 1).End(xlUp).Offset(1, 1).Row |
Dim IPrange As Range |
Set IPrange = ActiveSheet.Range("A:A") |
|
Dim erow As Long |
erow = Sheets("IMPROPER DETAIL").Cells(Rows.Count, 2).End(xlUp).Offset(1, 0).Row |
Dim erowb As Long |
erowb = Sheets("IMPROPER DETAIL").Cells(Rows.Count, 4).End(xlUp).Offset(1, 0).Row |
Dim erowc As Long |
erowc = Sheets("IMPROPER DETAIL").Cells(Rows.Count, 5).End(xlUp).Offset(1, 0).Row |
|
Do Until IP = "" |
|
|
Worksheets("QTR1").Activate |
|
Range("C20").Select |
ActiveCell.Offset(0, 0).Select |
Range(Selection, Selection.End(xlDown)).Copy |
Sheets("QTR1").Paste Destination:=Sheets("IMPROPER DETAIL").Cells(erow, 2) |
|
Application.CutCopyMode = False |
|
Worksheets("QTR1").Activate |
|
Range("D20").Select |
|
ActiveCell.Offset(0, 0).Select |
Range(Selection, Selection.End(xlDown)).Copy |
Sheets("QTR1").Paste Destination:=Sheets("IMPROPER DETAIL").Cells(erowb, 4) |
|
Application.CutCopyMode = False |
|
Worksheets("QTR1").Activate |
|
Range("E20").Select |
|
ActiveCell.Offset(0, 0).Select |
Range(Selection, Selection.End(xlDown)).Copy |
Sheets("QTR1").Paste Destination:=Sheets("IMPROPER DETAIL").Cells(erowc, 5) |
|
Application.CutCopyMode = False |
|
|
Worksheets("QTR1").Activate |
|
Range("B6").Copy |
Sheets("QTR1").Paste Destination:=Sheets("IMPROPER DETAIL").Cells(erow, 1) |
Application.CutCopyMode = False |
|
Range("A6").Select |
ActiveCell.AutoFill Range(ActiveCell, ActiveCell.Offset(0, 1).End(xlDown).Offset(0, -1)), Type:=xlFillCopy |
|
Range("A6").Select |
|
|
Worksheets("QTR2").Activate |
|
Range("C20").Select |
ActiveCell.Offset(0, 0).Select |
Range(Selection, Selection.End(xlDown)).Copy |
Sheets("QTR2").Paste Destination:=Sheets("IMPROPER DETAIL").Cells(erow, 2) |
|
Application.CutCopyMode = False |
|
Worksheets("QTR2").Activate |
|
Range("D20").Select |
|
ActiveCell.Offset(0, 0).Select |
Range(Selection, Selection.End(xlDown)).Copy |
Sheets("QTR2").Paste Destination:=Sheets("IMPROPER DETAIL").Cells(erowb, 4) |
|
Application.CutCopyMode = False |
|
Worksheets("QTR2").Activate |
|
Range("E20").Select |
|
ActiveCell.Offset(0, 0).Select |
Range(Selection, Selection.End(xlDown)).Copy |
Sheets("QTR2").Paste Destination:=Sheets("IMPROPER DETAIL").Cells(erowc, 5) |
|
Application.CutCopyMode = False |
|
|
Worksheets("QTR2").Activate |
|
Range("B6").Copy |
Sheets("QTR2").Paste Destination:=Sheets("IMPROPER DETAIL").Cells(erow, 1) |
Application.CutCopyMode = False |
|
ActiveSheet.Cells(erow, 1).Select |
ActiveCell.AutoFill Range(ActiveCell, ActiveCell.Offset(0, 1).End(xlDown).Offset(0, -1)), Type:=xlFillCopy |
|
Range("A6").Select |
Loop |
End Sub |