Hello All My name is 2Blessed....there is a file created every month that I must use to extract 2 columns of data and put into my spreadsheet. I have a code to get the data from the specific file for the month but I want to use a code that I will not have to change every month to open any file copy and paste the columns of data I need into my spreadsheet.
This is what I have now but it is for the month specifically
Sub Get2Columns()
'
' Get2Columns Macro
'Count Number of Rows In Worksheet
i = 1
Do While ActiveWorkbook.Sheets(1).Cells(i, 1) <> ""
i = i + 1
Loop
i = i - 1
'
Workbooks.Open Filename:= _
"Z:\Ops Support\Reports\Implementation Report\MAPD_Bus_Ops_ImplementationSupportReport2012\07. MAPD_Bus_Ops_ImplementationSupportReportJuly_2012_07_01.xlsx"
Range("A1:C2").Select
With Selection
.HorizontalAlignment = xlLeft
.VerticalAlignment = xlBottom
.WrapText = True
.Orientation = 0
.AddIndent = False
.IndentLevel = 0
.ShrinkToFit = False
.ReadingOrder = xlContext
.MergeCells = False
End With
Columns("C:D").Select
Selection.Copy
Windows("JCLNONJCLApp.xlsm").Activate
Columns("A:B").Select
ActiveSheet.Paste
End Sub
Bookmarks