I have no doubt this is basic, but I'm stuck...
Below is a recorded macro...the file "Tajuana Harper FL62.xls" is one of many Excel files I have to convert to a new file. The format's of the files are the same, but the naming convention is all over the place. In addition, the Worksheets within the files are named differently.
I simply want to replace "Tajuana Harper FL62.xls" with whatever active workbook and worksheet I choose...
My data instead gets thrown all over the place...
Below is the actual recorded macro without any enhancements...
Sub Macro9()
'
' Macro9 Macro
' Macro recorded 5/24/2009 by drmingle
'
'
Windows("Tajuana Harper FL62 Audit.xls").Activate
Range("C5:L5").Select
Selection.Copy
Windows("Team DuBose Audits.xls").Activate
Range("E824").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=True
Windows("Tajuana Harper FL62 Audit.xls").Activate
ActiveWindow.SmallScroll Down:=18
Range("C44:L44").Select
Application.CutCopyMode = False
Selection.Copy
Windows("Team DuBose Audits.xls").Activate
Range("B824").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=True
Windows("Tajuana Harper FL62 Audit.xls").Activate
Range("B2").Select
Application.CutCopyMode = False
Selection.Copy
Windows("Team DuBose Audits.xls").Activate
Range("A824").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Application.CutCopyMode = False
Selection.AutoFill Destination:=Range("A824:A832"), Type:=xlFillDefault
Range("A824:A832").Select
Windows("Tajuana Harper FL62 Audit.xls").Activate
Range("E2").Select
Selection.Copy
Windows("Team DuBose Audits.xls").Activate
Range("F824").Select
ActiveSheet.Paste
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Application.CutCopyMode = False
Selection.AutoFill Destination:=Range("F824:F832"), Type:=xlFillDefault
Range("F824:F832").Select
Windows("Tajuana Harper FL62 Audit.xls").Activate
Range("B4").Select
Selection.Copy
Windows("Team DuBose Audits.xls").Activate
Range("D824").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Application.CutCopyMode = False
Selection.AutoFill Destination:=Range("D824
832"), Type:=xlFillDefault
Range("D824
832").Select
Range("C823").Select
Selection.AutoFill Destination:=Range("C823:C832"), Type:=xlFillDefault
Range("C823:C832").Select
End Sub
Below is a recorded macro...the file "Tajuana Harper FL62.xls" is one of many Excel files I have to convert to a new file. The format's of the files are the same, but the naming convention is all over the place. In addition, the Worksheets within the files are named differently.
I simply want to replace "Tajuana Harper FL62.xls" with whatever active workbook and worksheet I choose...
My data instead gets thrown all over the place...
Below is the actual recorded macro without any enhancements...
Sub Macro9()
'
' Macro9 Macro
' Macro recorded 5/24/2009 by drmingle
'
'
Windows("Tajuana Harper FL62 Audit.xls").Activate
Range("C5:L5").Select
Selection.Copy
Windows("Team DuBose Audits.xls").Activate
Range("E824").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=True
Windows("Tajuana Harper FL62 Audit.xls").Activate
ActiveWindow.SmallScroll Down:=18
Range("C44:L44").Select
Application.CutCopyMode = False
Selection.Copy
Windows("Team DuBose Audits.xls").Activate
Range("B824").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=True
Windows("Tajuana Harper FL62 Audit.xls").Activate
Range("B2").Select
Application.CutCopyMode = False
Selection.Copy
Windows("Team DuBose Audits.xls").Activate
Range("A824").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Application.CutCopyMode = False
Selection.AutoFill Destination:=Range("A824:A832"), Type:=xlFillDefault
Range("A824:A832").Select
Windows("Tajuana Harper FL62 Audit.xls").Activate
Range("E2").Select
Selection.Copy
Windows("Team DuBose Audits.xls").Activate
Range("F824").Select
ActiveSheet.Paste
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Application.CutCopyMode = False
Selection.AutoFill Destination:=Range("F824:F832"), Type:=xlFillDefault
Range("F824:F832").Select
Windows("Tajuana Harper FL62 Audit.xls").Activate
Range("B4").Select
Selection.Copy
Windows("Team DuBose Audits.xls").Activate
Range("D824").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Application.CutCopyMode = False
Selection.AutoFill Destination:=Range("D824
Range("D824
Range("C823").Select
Selection.AutoFill Destination:=Range("C823:C832"), Type:=xlFillDefault
Range("C823:C832").Select
End Sub