butters149
New Member
- Joined
- Mar 21, 2018
- Messages
- 23
Hello,
I have the small pasted VBA below. I was wondering what code can I add in so that if it cannot find, it will move onto the next find? Thanks!
Dim rngName As Range
Set rngName = Range("L1:CA1").Find("Name")
Range(rngName, rngName.End(xlDown)).Select
Selection.Delete Shift:=xlToLeft
Dim rngApp As Range
Set rngApp = Range("L1:L1").Find("Approved")
Range(rngApp, rngApp.End(xlDown)).Select
Selection.Delete Shift:=xlToLeft
I have the small pasted VBA below. I was wondering what code can I add in so that if it cannot find, it will move onto the next find? Thanks!
Dim rngName As Range
Set rngName = Range("L1:CA1").Find("Name")
Range(rngName, rngName.End(xlDown)).Select
Selection.Delete Shift:=xlToLeft
Dim rngApp As Range
Set rngApp = Range("L1:L1").Find("Approved")
Range(rngApp, rngApp.End(xlDown)).Select
Selection.Delete Shift:=xlToLeft