• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 746
  • Last Modified:

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
0
McQMom
Asked:
McQMom
  • 2
  • 2
1 Solution
 
nutschCommented:
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
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now