deletedalien
Well-known Member
- Joined
- Dec 8, 2008
- Messages
- 505
- Office Version
- 2013
- Platform
- Windows
So i know that the lines in red are wrong because they do random things every time i run this code, and i can't remember how to do this
First error line
i want to select from row 2 columns A:V and all the way down and delete that data (but sometimes it also deletes whats in column W.....
The second error line
only selects rows 4 & 5 from columns A:V....
Thankx in advance for any help given.
First error line
i want to select from row 2 columns A:V and all the way down and delete that data (but sometimes it also deletes whats in column W.....
The second error line
only selects rows 4 & 5 from columns A:V....
Rich (BB code):
Sub Centris()
ActiveSheet.Previous.Select
Range("A2:V2", Selection.End(xlDown)).ClearContents
Selection.End(xlToLeft).Select
ActiveWindow.ActivateNext
Range("A5:V5", Selection.End(xlDown)).copy
ActiveWindow.ActivateNext
Range("A2").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Application.CutCopyMode = False
ActiveSheet.PivotTables("PivotTable2").PivotCache.Refresh
End Sub
Thankx in advance for any help given.