ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Formula to extract a specific word from text string (https://www.excelbanter.com/excel-worksheet-functions/117421-formula-extract-specific-word-text-string.html)

Dinesh

Formula to extract a specific word from text string
 
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

Dave F

Formula to extract a specific word from text string
 
Try this: =IF(FIND("deleted",A2,1),"D","R")

Dave
--
Brevity is the soul of wit.


"Dinesh" wrote:

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


Dave F

Formula to extract a specific word from text string
 
Actually, use this: =IF(ISERROR(FIND("deleted",D7,1)),"R","D")

Dave
--
Brevity is the soul of wit.


"Dinesh" wrote:

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


Bernard Liengme

Formula to extract a specific word from text string
 
With the text in A1
=IF(ISERROR(FIND("rejected",A1)),"","R")&IF(ISERRO R(FIND("deleted",A1)),"","D")
Not sure the relevance of the cell holding the formula
best wishes
--
Bernard V Liengme
www.stfx.ca/people/bliengme
remove caps from email

"Dinesh" wrote in message
...
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




Bob Umlas, Excel MVP

Formula to extract a specific word from text string
 
=SUBSTITUTE(SUBSTITUTE(A1,"deleted","D"),"rejected ","R")

"Dinesh" wrote:

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



All times are GMT +1. The time now is 10:32 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com