Solved

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

Posted on 2011-03-15
5
721 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
Comment Utility
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
Comment Utility
Perfect! thank you so much for the quick response....
0
 
LVL 39

Expert Comment

by:nutsch
Comment Utility
Glad to help. Thanks for the grade.

Thomas
0
 
LVL 29

Expert Comment

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

Expert Comment

by:gowflow
Comment Utility
OOPs I guess I was a bitttttt late !!!
Cheers
gowflow
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

This article will show you how to use shortcut menus in the Access run-time environment.
Recently Microsoft released a brand new function called CONCAT. It's supposed to replace its predecessor CONCATENATE. But how does it work? And what's new? In this article, we take a closer look at all of this - we even included an exercise file for…
This Micro Tutorial will demonstrate how to use a scrolling table in Microsoft Excel using the INDEX function.
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…

772 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now