Learn when you want, where you want with convenient online training courses. Sign up now!
Experts Exchange Solution brought to you by
"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.
Dim xRows As Long
Dim xResponse As Long
Dim xLast_Row As Long
Dim xOutput As Long
Dim xSummary As Worksheet
Dim xSheet As Variant
Set xSummary = Sheets("Summary")
xRows = xSummary.UsedRange.Cells(1, 1).Row + xSummary.UsedRange.Rows.Count - 1
If xRows > 1 Then
xResponse = MsgBox("Data found in the Summary sheet (" & xRows & " rows)." & Chr(10) & "'OK' to delete them, 'Cancel' to quit.", vbOKCancel, "List Job Numbers")
If xResponse = 2 Then
MsgBox ("User chose to quit.")
xSummary.Range("2:" & xRows).Delete
xRows = 1
Application.ScreenUpdating = False
For Each xSheet In Array("Sheet1", "Sheet2", "Sheet3", "Sheet4", "Sheet5", "Sheet6")
xLast_Row = .UsedRange.Cells(1, 1).Row + .UsedRange.Rows.Count - 1
If xLast_Row > 1 Then
.Range("E2:E" & xLast_Row).Copy Destination:=xSummary.Range("A" & xRows + 1)
xRows = xRows + xLast_Row - 1
Application.ScreenUpdating = True
MsgBox ("Run complete - " & xRows - 1 & " entries copied.")
Open in new window
Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.
From novice to tech pro — start learning today.
Premium members can enroll in this course at no extra cost.