ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Modify search function (https://www.excelbanter.com/excel-worksheet-functions/224611-modify-search-function.html)

Dinesh

Modify search function
 
Hi,

I have following formula that needs to be modified.

=IF(ISERROR(SEARCH("BOFA",V98)),"0",MID(V98,SEARCH ("- ",V98)+1,99)+0)

Seconf search criteria which is "- " can be either "- " or "for". How can i
incorporate the second criteria as "for"?

Thanks,
Dinesh

Dinesh

Modify search function
 
Actually I want to modify the whole text search as following. Disregard the
earlier question.
Below is a text string. I want to extract the $ value from it. Text string
must have €œBOFA€ name on it.
Here its get complicated. Precedent to a $ value, there are different type
of text string. In the example below is €œ- €, in addition to that some time
it can be €œInc€ and €œfor €œas well.
Here is my formula which has a €œ- €œtext string and works perfectly. Also
can you explain the function of +1, 99)+0) in the formula.
=IF(ISERROR(SEARCH("BOFA",D1)),"0",MID(D1,SEARCH("- ",D1)+1,99)+0)

Text string
Wireless Data Services MLA 6733 SCH 002-000 CSC-71745 Proceeds to BOFA for -
621063.11



"Dinesh" wrote:

Hi,

I have following formula that needs to be modified.

=IF(ISERROR(SEARCH("BOFA",V98)),"0",MID(V98,SEARCH ("- ",V98)+1,99)+0)

Seconf search criteria which is "- " can be either "- " or "for". How can i
incorporate the second criteria as "for"?

Thanks,
Dinesh


Dinesh

Modify search function
 
Actually I want to modify the whole text search as following. Disregard the
earlier question.
Below is a text string. I want to extract the $ value from it. Text string
must have €œBOFA€ name on it.
Here its get complicated. Precedent to a $ value, there are different type
of text string. In the example below is €œ- €, in addition to that some time
it can be €œInc€ and €œfor €œas well.
Here is my formula which has a €œ- €œtext string and works perfectly. Also
can you explain the function of +1, 99)+0) in the formula.
=IF(ISERROR(SEARCH("BOFA",D1)),"0",MID(D1,SEARCH("- ",D1)+1,99)+0)

test string
Wireless Data Services MLA 6733 SCH 002-000 CSC-71745 Proceeds to BOFA for -
621063.11



"Dinesh" wrote:

Hi,

I have following formula that needs to be modified.

=IF(ISERROR(SEARCH("BOFA",V98)),"0",MID(V98,SEARCH ("- ",V98)+1,99)+0)

Seconf search criteria which is "- " can be either "- " or "for". How can i
incorporate the second criteria as "for"?

Thanks,
Dinesh


Ashish Mathur[_2_]

Modify search function
 
Hi,

Use this formula

=IF(ISERROR(MID(C18,SEARCH({"-","inc","for"},C18,SEARCH("BOFA",C18,1))+1,50)*1), "",MID(C18,SEARCH({"-","inc","for"},C18,SEARCH("BOFA",C18,1))+1,50) *1)

--
Regards,

Ashish Mathur
Microsoft Excel MVP
www.ashishmathur.com

"Dinesh" wrote in message
...
Actually I want to modify the whole text search as following. Disregard
the
earlier question.
Below is a text string. I want to extract the $ value from it. Text string
must have €œBOFA€ name on it.
Here its get complicated. Precedent to a $ value, there are different
type
of text string. In the example below is €œ- €, in addition to that some
time
it can be €œInc€ and €œfor €œas well.
Here is my formula which has a €œ- €œtext string and works perfectly. Also
can you explain the function of +1, 99)+0) in the formula.
=IF(ISERROR(SEARCH("BOFA",D1)),"0",MID(D1,SEARCH("- ",D1)+1,99)+0)

Text string
Wireless Data Services MLA 6733 SCH 002-000 CSC-71745 Proceeds to BOFA
for -
621063.11



"Dinesh" wrote:

Hi,

I have following formula that needs to be modified.

=IF(ISERROR(SEARCH("BOFA",V98)),"0",MID(V98,SEARCH ("- ",V98)+1,99)+0)

Seconf search criteria which is "- " can be either "- " or "for". How can
i
incorporate the second criteria as "for"?

Thanks,
Dinesh




All times are GMT +1. The time now is 05:31 AM.

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