View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Dinesh Dinesh is offline
external usenet poster
 
Posts: 103
Default 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