Formula to extract a specific word from text string

D

Dinesh

I have a long text string. Within the text string, there is always a word
either "deleted" or "rejected". I like to equate the word "deleted" as "D" or
"rejected" as "R". What will be my formula. Assume the formula is on "A2".

Thanks in advance for the help.

Dinesh
 
B

Bernard Liengme

With the text in A1
=IF(ISERROR(FIND("rejected",A1)),"","R")&IF(ISERROR(FIND("deleted",A1)),"","D")
Not sure the relevance of the cell holding the formula
best wishes
 
Top