Solved

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

Posted on 2011-03-15
5
724 Views
Last Modified: 2012-05-11
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
Comment
Question by:McQMom
  • 2
  • 2
5 Comments
 
LVL 39

Accepted Solution

by:
nutsch earned 500 total points
ID: 35140636
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
 

Author Closing Comment

by:McQMom
ID: 35140669
Perfect! thank you so much for the quick response....
0
 
LVL 39

Expert Comment

by:nutsch
ID: 35140702
Glad to help. Thanks for the grade.

Thomas
0
 
LVL 29

Expert Comment

by:gowflow
ID: 35140951
Hello,
Is this what your looking for ?
gowflow
Stale-Events-Experts-Exchange-ex.xlsm
0
 
LVL 29

Expert Comment

by:gowflow
ID: 35140961
OOPs I guess I was a bitttttt late !!!
Cheers
gowflow
0

Featured Post

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Outlook Free & Paid Tools
When you see single cell contains number and text, and you have to get any date out of it seems like cracking our heads.
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

770 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question