Excel vba copy column cells of specific worksheets to another worksheet.

Hi! I have a workbook that contains several worksheets: Data, 2850 Open, 2850 Resolved (etc), and Trace. What I need is to copy the numbers in Colimns M and N in the "#### Open" worksheets to columns A & B on my "Trace" worksheet. I'd like to trigger the macro with the button I have installed on the Trace worksheet.Thanks for any help.... Stale-Events-Experts-Exchange-ex.xlsm
McQMomAsked:
Who is Participating?
 
nutschConnect With a Mentor Commented:
Here is the code and the file

Sub transfer()
Dim sht As Worksheet

Application.ScreenUpdating = False

Intersect(Sheets("TRACE").UsedRange, Sheets("TRACE").Range("A2:B" & Rows.Count)).ClearContents

For Each sht In ActiveWorkbook.Worksheets
    If Right(sht.Name, 4) = "Open" Then _
        sht.Range(sht.Cells(2, "M"), sht.Cells(Rows.Count, "N").End(xlUp)).Copy _
            Sheets("TRACE").Cells(Rows.Count, 1).End(xlUp).Offset(1)
Next sht

Application.ScreenUpdating = True
End Sub

Open in new window


Thomas
Copy-of-Stale-Events-Experts-Exc.xlsm
0
 
McQMomAuthor Commented:
Perfect! thank you so much for the quick response....
0
 
nutschCommented:
Glad to help. Thanks for the grade.

Thomas
0
 
gowflowCommented:
Hello,
Is this what your looking for ?
gowflow
Stale-Events-Experts-Exchange-ex.xlsm
0
 
gowflowCommented:
OOPs I guess I was a bitttttt late !!!
Cheers
gowflow
0
All Courses

From novice to tech pro — start learning today.