The problem is to get the macro to select the data from the RawData sheet and paste it into the correct one of four other sheets. I have attached a copy of the file with the various macros.
The problem is to get the macro to select the data from the RawData sheet and paste it into the correct one of four other sheets. I have attached a copy of the file with the various macros.
I have found a solution which works very well.
![]()
Sub SortAllData() ' This is the main filter -Sort Macro Dim ws As Worksheet Application.ScreenUpdating = False For Each ws In Worksheets If ws.Name <> "RawData" Then With Sheets("RawData") .Range("A1").AutoFilter field:=5, Criteria1:=ws.Name .AutoFilter.Range.Offset(1).Copy ws.Range("A2") .ShowAllData End With End If Next ws Sheets("RawData").AutoFilterMode = False Application.ScreenUpdating = True End Sub
Last edited by arlu1201; 06-10-2013 at 01:30 AM.
Welcome to the forum.
I have added code tags to your post. As per forum rule 3, you need to use them whenever you put any code in your post. Please add them in future. In order to put code tags, either type [CODE] before your code and [/CODE] at the end of it, OR you can highlight your code and click the # icon at the top of your post window.
If I have helped, Don't forget to add to my reputation (click on the star below the post)
Don't forget to mark threads as "Solved" (Thread Tools->Mark thread as Solved)
Use code tags when posting your VBA code: [code] Your code here [/code]
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks