ChrisAch
07-25-2016, 03:11 AM
Morning all.
I have the below code which finds an error code in a pivot sheet, then shows data, and renames that tab inline with the code.
However ... these codes change daily.
Im trying to understand where I would put else if, in order to skip if this code is not found and move onto the next code...
Or a smarter way of writing the below example code.
Sheets("Chris Error Code List").Select
Cells.Find(What:="009", After:=ActiveCell, LookIn:=xlFormulas, LookAt _
:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, MatchCase:= _
False, SearchFormat:=False).Activate
ActiveCell.Offset(columnOffset:=1).Activate Selection.ShowDetail = True
Sheets(4).Name = "009"
Thank you
I have the below code which finds an error code in a pivot sheet, then shows data, and renames that tab inline with the code.
However ... these codes change daily.
Im trying to understand where I would put else if, in order to skip if this code is not found and move onto the next code...
Or a smarter way of writing the below example code.
Sheets("Chris Error Code List").Select
Cells.Find(What:="009", After:=ActiveCell, LookIn:=xlFormulas, LookAt _
:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, MatchCase:= _
False, SearchFormat:=False).Activate
ActiveCell.Offset(columnOffset:=1).Activate Selection.ShowDetail = True
Sheets(4).Name = "009"
Thank you