Ok so I am recording a Macro (actually not the whole thing, trying to learn to write). My issues is I unhide my udpate sheet "Forecast Update", open "H:\FORECASTING GROUP\Demand Planning\Forecast Reviews\2017 Q4 Review.xlsx" and want to copy and paste from "H:\FORECASTING GROUP\Demand Planning\Forecast Reviews\2017 Q4 Review.xlsx" to book "Forecast Update" however whenever i run the macro it sticks to another tab "Change Log". Can someone please help me? Thank you very much! Code us attached
Sub Attain_Update()
'
' Attain_Update Macro
'
'
Sheets("Forecast Update").Visible = True
Range("A1").Select
Workbooks.Open Filename:= _
"H:\FORECASTING GROUP\Demand Planning\Forecast Reviews\2017 Q4 Review.xlsx"
Range("D11:F11").Select
Range(Selection, Selection.End(xlDown)).Select
Selection.Copy
Windows("2017 YoY Q4 Review V2-Lite Version.xlsx").Activate
Range("A1").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Range("E2").Select
Application.CutCopyMode = False
Application.CutCopyMode = False
ActiveCell.FormulaR1C1 = "=TRIM(RC[-4])"
Range("E2").Select
Selection.Copy
Range("A2").Select
Selection.End(xlDown).Select
Range("E26320").Select
Range(Selection, Selection.End(xlUp)).Select
ActiveSheet.Paste
Selection.End(xlUp).Select
Range("E2").Select
Range(Selection, Selection.End(xlDown)).Select
Application.CutCopyMode = False
Selection.Copy
Columns("A:A").Select
Range("A26285").Activate
Selection.End(xlUp).Select
Range("A2").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Range("F1").Select
Application.CutCopyMode = False
ActiveCell.FormulaR1C1 = "1"
Range("F1").Select
Selection.Copy
Range("A2").Select
Range(Selection, Selection.End(xlDown)).Select
Selection.PasteSpecial Paste:=xlPasteAll, Operation:=xlMultiply, _
SkipBlanks:=False, Transpose:=False
Application.CutCopyMode = False
With Selection
.HorizontalAlignment = xlLeft
.VerticalAlignment = xlBottom
.WrapText = False
.Orientation = 0
.AddIndent = False
.IndentLevel = 0
.ShrinkToFit = False
.ReadingOrder = xlContext
.MergeCells = False
End With
Range("B2:C2").Select
Range(Selection, Selection.End(xlDown)).Select
Selection.NumberFormat = "$#,##0"
Range("B4").Select
Sheets("Forecast Update").Select
ActiveWindow.SelectedSheets.Visible = False
End Sub
Sub Fcst_Update()
End Sub
Sub Attain_Update()
'
' Attain_Update Macro
'
'
Sheets("Forecast Update").Visible = True
Range("A1").Select
Workbooks.Open Filename:= _
"H:\FORECASTING GROUP\Demand Planning\Forecast Reviews\2017 Q4 Review.xlsx"
Range("D11:F11").Select
Range(Selection, Selection.End(xlDown)).Select
Selection.Copy
Windows("2017 YoY Q4 Review V2-Lite Version.xlsx").Activate
Range("A1").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Range("E2").Select
Application.CutCopyMode = False
Application.CutCopyMode = False
ActiveCell.FormulaR1C1 = "=TRIM(RC[-4])"
Range("E2").Select
Selection.Copy
Range("A2").Select
Selection.End(xlDown).Select
Range("E26320").Select
Range(Selection, Selection.End(xlUp)).Select
ActiveSheet.Paste
Selection.End(xlUp).Select
Range("E2").Select
Range(Selection, Selection.End(xlDown)).Select
Application.CutCopyMode = False
Selection.Copy
Columns("A:A").Select
Range("A26285").Activate
Selection.End(xlUp).Select
Range("A2").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Range("F1").Select
Application.CutCopyMode = False
ActiveCell.FormulaR1C1 = "1"
Range("F1").Select
Selection.Copy
Range("A2").Select
Range(Selection, Selection.End(xlDown)).Select
Selection.PasteSpecial Paste:=xlPasteAll, Operation:=xlMultiply, _
SkipBlanks:=False, Transpose:=False
Application.CutCopyMode = False
With Selection
.HorizontalAlignment = xlLeft
.VerticalAlignment = xlBottom
.WrapText = False
.Orientation = 0
.AddIndent = False
.IndentLevel = 0
.ShrinkToFit = False
.ReadingOrder = xlContext
.MergeCells = False
End With
Range("B2:C2").Select
Range(Selection, Selection.End(xlDown)).Select
Selection.NumberFormat = "$#,##0"
Range("B4").Select
Sheets("Forecast Update").Select
ActiveWindow.SelectedSheets.Visible = False
End Sub
Sub Fcst_Update()
End Sub