This is my first VBA and it gets stuck at the very end - its not pasting...
I have no clue what to do.
Please if you can look at the code and help me i will appreciate it
Sub Macro3()
'
' Macro3 Macro
'
' Keyboard Shortcut: Ctrl+t
'
Columns("A:A").Select
Selection.Insert Shift:=xlToRight, CopyOrigin:=xlFormatFromLeftOrAbove
Range("A4").Select
ActiveCell.FormulaR1C1 = "Date"
Range("A5").Select
Range("L3").Copy
Range("A5").PasteSpecial , Paste:=xlPasteValues
Rows(3).EntireRow.Delete
Rows(2).EntireRow.Delete
Rows(1).EntireRow.Delete
ActiveCell.EntireColumn.AutoFit
Range("A2").Select
Selection.AutoFill Destination:=Range("A2:A" & Range("B" & Rows.Count).End(xlUp).Row)
Range(Selection, Selection.End(xlDown)).Select
Range("A2").Copy
Selection.PasteSpecial Paste:=xlPasteValues
Columns("I:X").Select
Selection.Delete Shift:=xlToLeft
Columns("J:J").Select
Selection.Delete Shift:=xlToLeft
Columns("G:G").Select
Selection.Delete Shift:=xlToLeft
Columns("E:E").Select
Selection.Delete Shift:=xlToLeft
Range("M5").Select
ActiveSheet.Hyperlinks.Add Anchor:=Selection, Address:= _
"C:\Users\lplaczek\Desktop\Summary Report Master File\summaryReport 10.08.21 .xlsm" _
, SubAddress:="summaryReport!A2", TextToDisplay:= _
"C:\Users\lplaczek\Desktop\Summary Report Master File\summaryReport 10.08.21 .xlsm#summaryReport!A2"
LR = Cells.Find("*", Cells(1, 1), xlFormulas, xlPart, xlByRows, xlPrevious, False).Row
Range("A2:K" & LR).Copy
Selection.Hyperlinks(1).Follow NewWindow:=False, AddHistory:=True
ActiveSheet.ListObjects("Table1").ListRows.Add AlwaysInsert:=True
Range("A2").Select
Selection.End(xlDown).Offset(1, 0).Select
'ActiveCell.Offset(1, 0).Select
Selection.PasteSpecial xlPasteValues
Application.CutCopyMode = False
Sheets("PIVOT").Select
ActiveSheet.PivotTables("PivotTable1").PivotCache.Refresh
MsgBox (" Wesli Have a nice day")
I have no clue what to do.
Please if you can look at the code and help me i will appreciate it
Sub Macro3()
'
' Macro3 Macro
'
' Keyboard Shortcut: Ctrl+t
'
Columns("A:A").Select
Selection.Insert Shift:=xlToRight, CopyOrigin:=xlFormatFromLeftOrAbove
Range("A4").Select
ActiveCell.FormulaR1C1 = "Date"
Range("A5").Select
Range("L3").Copy
Range("A5").PasteSpecial , Paste:=xlPasteValues
Rows(3).EntireRow.Delete
Rows(2).EntireRow.Delete
Rows(1).EntireRow.Delete
ActiveCell.EntireColumn.AutoFit
Range("A2").Select
Selection.AutoFill Destination:=Range("A2:A" & Range("B" & Rows.Count).End(xlUp).Row)
Range(Selection, Selection.End(xlDown)).Select
Range("A2").Copy
Selection.PasteSpecial Paste:=xlPasteValues
Columns("I:X").Select
Selection.Delete Shift:=xlToLeft
Columns("J:J").Select
Selection.Delete Shift:=xlToLeft
Columns("G:G").Select
Selection.Delete Shift:=xlToLeft
Columns("E:E").Select
Selection.Delete Shift:=xlToLeft
Range("M5").Select
ActiveSheet.Hyperlinks.Add Anchor:=Selection, Address:= _
"C:\Users\lplaczek\Desktop\Summary Report Master File\summaryReport 10.08.21 .xlsm" _
, SubAddress:="summaryReport!A2", TextToDisplay:= _
"C:\Users\lplaczek\Desktop\Summary Report Master File\summaryReport 10.08.21 .xlsm#summaryReport!A2"
LR = Cells.Find("*", Cells(1, 1), xlFormulas, xlPart, xlByRows, xlPrevious, False).Row
Range("A2:K" & LR).Copy
Selection.Hyperlinks(1).Follow NewWindow:=False, AddHistory:=True
ActiveSheet.ListObjects("Table1").ListRows.Add AlwaysInsert:=True
Range("A2").Select
Selection.End(xlDown).Offset(1, 0).Select
'ActiveCell.Offset(1, 0).Select
Selection.PasteSpecial xlPasteValues
Application.CutCopyMode = False
Sheets("PIVOT").Select
ActiveSheet.PivotTables("PivotTable1").PivotCache.Refresh
MsgBox (" Wesli Have a nice day")