baykaone

Untitled

Dec 15th, 2020
1,304
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. Sub Macro2()
  2.     Dim cell As Range, x As Integer
  3.     Sheets("cleanup").Select
  4.     Range("AD1").Select
  5.     Range(Selection, Selection.End(xlToRight)).Select
  6.     Set cell = Selection.Find(What:="Resolved", After:=ActiveCell, LookIn:=xlFormulas, _
  7.         LookAt:=xlWhole, SearchOrder:=xlByColumns, SearchDirection:=xlNext, _
  8.         MatchCase:=False, SearchFormat:=False)
  9.     x = cell.Column
  10.  
  11.     If x > 0 Then
  12.         Columns(x).Select
  13.         Selection.Delete Shift:=xlToLeft
  14.     End If
  15. End Sub
RAW Paste Data