I'm not good at this (very new) so I'm not shocked that it didn't work quite right, but it REALLY doesn't work right.
What I would like it to do is filter a large sheet of information for anything that starts "NCC", then copy-paste that information into a sheet pre-labeled "coop agr". Instead, it pastes one cell with the wrong information. I used the "relative reference" button for selecting the sheet since all the files are different sizes, but it is confusing me terribly. Please help!
Here's the code:
Sub CooperativeAgreements()
'
' CooperativeAgreements Macro
' Macro recorded 8/1/2005 by Derek Prather should separate Coop Agr from download
'
' Keyboard Shortcut: Ctrl+q
'
Selection.AutoFilter
Selection.AutoFilter Field:=5, Criteria1:="=*NCC**", Operator:=xlAnd
ActiveCell.Cells.Select
Selection.Copy
Sheets("coop agr").Select
ActiveCell.Cells.Select
ActiveSheet.Paste
ActiveCell.Cells.Select
ActiveCell.Cells.EntireColumn.AutoFit
End Sub
What I would like it to do is filter a large sheet of information for anything that starts "NCC", then copy-paste that information into a sheet pre-labeled "coop agr". Instead, it pastes one cell with the wrong information. I used the "relative reference" button for selecting the sheet since all the files are different sizes, but it is confusing me terribly. Please help!
Here's the code:
Sub CooperativeAgreements()
'
' CooperativeAgreements Macro
' Macro recorded 8/1/2005 by Derek Prather should separate Coop Agr from download
'
' Keyboard Shortcut: Ctrl+q
'
Selection.AutoFilter
Selection.AutoFilter Field:=5, Criteria1:="=*NCC**", Operator:=xlAnd
ActiveCell.Cells.Select
Selection.Copy
Sheets("coop agr").Select
ActiveCell.Cells.Select
ActiveSheet.Paste
ActiveCell.Cells.Select
ActiveCell.Cells.EntireColumn.AutoFit
End Sub