Creating Macro to copy data from one WB & Save to new WB
Closed
sawallac
Posts
2
Registration date
Thursday 10 January 2013
Status
Member
Last seen
11 January 2013
-
10 Jan 2013 à 16:05
rizvisa1 Posts 4478 Registration date Thursday 28 January 2010 Status Contributor Last seen 5 May 2022 - 11 Jan 2013 à 11:18
rizvisa1 Posts 4478 Registration date Thursday 28 January 2010 Status Contributor Last seen 5 May 2022 - 11 Jan 2013 à 11:18
Related:
- Creating Macro to copy data from one WB & Save to new WB
- How to copy data from one excel sheet to another - Guide
- Save as pdf office 2007 - Download - Other
- How to copy data to multiple worksheets in Excel - Guide
- Excel move data from one sheet to another - Guide
- How to export data from facebook - Guide
2 responses
rizvisa1
Posts
4478
Registration date
Thursday 28 January 2010
Status
Contributor
Last seen
5 May 2022
766
10 Jan 2013 à 17:12
10 Jan 2013 à 17:12
Well the first start could be if you start macro recorder, create a sheet as you want and then stop the macro. This can give you a good template to start
sawallac
Posts
2
Registration date
Thursday 10 January 2013
Status
Member
Last seen
11 January 2013
11 Jan 2013 à 09:40
11 Jan 2013 à 09:40
The code below was recorded; but I am getting an error:
Sub PullData()
'
' PullData Macro
'
' Keyboard Shortcut: Ctrl+Shift+A
'
ActiveSheet.Range("$A$1:$S$63758").AutoFilter Field:=2, Criteria1:="2"
ActiveCell.Offset(-63764, 0).Range("A1:S3245").Select
Selection.Copy
Workbooks.Add
ActiveSheet.Paste
Application.CutCopyMode = False
ActiveWorkbook.SaveAs Filename:="C:\Users\sawallac\Documents\Campus2.xlsx", _
FileFormat:=xlOpenXMLWorkbook, CreateBackup:=False
ActiveWindow.Close
ChDir "C:\Users\sawallac\Desktop\Project Management\FAC Need Projections"
ActiveWorkbook.SaveAs Filename:= _
"C:\Users\sawallac\Desktop\Project Management\FAC Need Projections\UOPFacultycourseload.xlsm" _
, FileFormat:=xlOpenXMLWorkbookMacroEnabled, CreateBackup:=False
End Sub
Any Suggestions?
Sub PullData()
'
' PullData Macro
'
' Keyboard Shortcut: Ctrl+Shift+A
'
ActiveSheet.Range("$A$1:$S$63758").AutoFilter Field:=2, Criteria1:="2"
ActiveCell.Offset(-63764, 0).Range("A1:S3245").Select
Selection.Copy
Workbooks.Add
ActiveSheet.Paste
Application.CutCopyMode = False
ActiveWorkbook.SaveAs Filename:="C:\Users\sawallac\Documents\Campus2.xlsx", _
FileFormat:=xlOpenXMLWorkbook, CreateBackup:=False
ActiveWindow.Close
ChDir "C:\Users\sawallac\Desktop\Project Management\FAC Need Projections"
ActiveWorkbook.SaveAs Filename:= _
"C:\Users\sawallac\Desktop\Project Management\FAC Need Projections\UOPFacultycourseload.xlsm" _
, FileFormat:=xlOpenXMLWorkbookMacroEnabled, CreateBackup:=False
End Sub
Any Suggestions?
rizvisa1
Posts
4478
Registration date
Thursday 28 January 2010
Status
Contributor
Last seen
5 May 2022
766
11 Jan 2013 à 11:18
11 Jan 2013 à 11:18
see this thread
it is same as you want , except that creates separate sheets instead of workbooks
https://ccm.net/forum/affich-258700-interesting-question-for-excel-champions
it is same as you want , except that creates separate sheets instead of workbooks
https://ccm.net/forum/affich-258700-interesting-question-for-excel-champions