excel - Search for a variable string within a string -
this actual problem: have text in a1:
the gross return of s&p index on past year has been 5%. isin gross return ch354892. isin net return ch875621.
i want write general function return isin gross return, ch354892
. thinking of searching words gross return
, isin
, if difference of positions between them < 35, grab text starting 5 positions after gross return
, ending @ 8 positions after start.
is there way it?
the first is
seems equally distinctive:
=mid(a1,find(" ",a1)+4,8)
Comments
Post a Comment