So I imported a text file and now I want to search column "A" in a sheet "Info" to see if these phrases ("N o r m a l t e r m i n a t i o n", "E r r o r t e r m i n a t i o n") exist. Here is what I recorded:
PHP Code:
Cells.Find(What:="N o r m a l t e r m i n a t i o n", After:=ActiveCell, LookIn:= _
xlFormulas, LookAt:=xlPart, SearchOrder:=xlByRows, SearchDirection:= _
xlNext, MatchCase:=False, SearchFormat:=False).Activate
Cells.Find(What:="E r r o r t e r m i n a t i o n", After:=ActiveCell, _
LookIn:=xlFormulas, LookAt:=xlPart, SearchOrder:=xlByRows, _
SearchDirection:=xlNext, MatchCase:=False, SearchFormat:=False).Activate
Range("B4").Select
ActiveCell.FormulaR1C1 = "The analysis resulted in ______"
After finding them, I want excel to display in "B4" in sheet "Info": "This analysis resulted in 'Normal termination'" OR "This analysis resulted in 'Error termination'".
I picture the code being something like:
Find "phrase". If phrase is found, display "str". Else find "other phrase". Display "other phrase".
Bookmarks