Hi,
I need to hide columns, copy visible data below the header from workbook 1, Open workbook 2 and paste the selection from workbook 1 into the next available row.
I have provided the code I have been working with below and any suggestions would be greatly appreciated. Please let me know if more information is required.
Sub Macro2()
Dim rng As Range
'Hide the columns that are not needed for Expediting Report
With Application.ActiveWorkbook
Set rng = Range(Range("A3:DL3"), Range("A3:DL3").End(xlDown))
Range( _
"F:K,O:Q,U:U,W:AC,AE:AJ,AN:AN,AP:AP,AR:AR,AT:AT,AV:AY,BA:BD,BF:BF,BI:BM,BP:BQ,BS:CC,CE:DE" _
).Select
Selection.EntireColumn.Hidden = True
Selection.Copy
End With
ChDir "C:\Users\kneville\Desktop"
Workbooks.Open Filename:= _
"C:\Users\kneville\Desktop\New PO Expediting Report.xlsx"
Range("A" & Rows.Count).End(xlUp).Offset(1).Select
With Selection
ActiveCell.Paste
End With
Application.CutCopyMode = False
ActiveWorkbook.Save
End Sub
Bookmarks