Can you do an If statement in Excel based on a Search finding certain criteria?
I want it to do one thing if A1 contains Branch and another thing if A1 contains Region...
Range("A1".Select
Cells.Find(What:="branch", After:=Activecell, LookIn:=xlValues, LookAt:=xlPart, SearchOrder:=xlByColumns, SearchDirection:=xlNext, MatchCase:=False).Activate
Cells.FindNext(After:=Activecell).Activate
ActiveCell.Offset(0, 50).Select
...
I want to be able to find branch and it run the correct code, then I want it to find region and it run different code (or the same code in a different order).
Is there any way to do this?
I want it to do one thing if A1 contains Branch and another thing if A1 contains Region...
Range("A1".Select
Cells.Find(What:="branch", After:=Activecell, LookIn:=xlValues, LookAt:=xlPart, SearchOrder:=xlByColumns, SearchDirection:=xlNext, MatchCase:=False).Activate
Cells.FindNext(After:=Activecell).Activate
ActiveCell.Offset(0, 50).Select
...
I want to be able to find branch and it run the correct code, then I want it to find region and it run different code (or the same code in a different order).
Is there any way to do this?