View Single Post
  #14   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Domenic
 
Posts: n/a
Default Matching Text with With Certain Criteria

Forgot to change the references to match your worksheet. Just in case
there's any confusion, the formula should be as follows...

=IF(OR(ISNUMBER(FIND(List,G1))),MID(G1,LOOKUP(BigN um,FIND(List,G1)),FIND(
",",G1&",",LOOKUP(BigNum,FIND(List,G1)))-LOOKUP(BigNum,FIND(List,G1))),B1
)

....confirmed with CONTROL+SHIFT+ENTER.

In article ,
Domenic wrote:

Not to mar your elegant work with a beginner's learning, but: Assuming the
primary exchange is in Cell B1, all exchanges are in Cell G1, I modified
the
formula to return the Primary Exchange if it Doesn't find a U.S. Exchange
in
Cell G1:

=IF(ISERROR(MID(G1,LOOKUP(BigNum,FIND(List,G1)),FI ND(",",G1&",",LOOKUP(BigNu
m,
FIND(List,G1)))-LOOKUP(BigNum,FIND(List,G1)))),B1,(MID(G1,LOOKUP(B igNum,FIND
(L
ist,G1)),FIND(",",G1&",",LOOKUP(BigNum,FIND(List,G 1)))-LOOKUP(BigNum,FIND(Li
st
,G1)))))


=IF(OR(ISNUMBER(FIND(List,C2))),MID(C2,LOOKUP(BigN um,FIND(List,C2)),FIND(
",",C2&",",LOOKUP(BigNum,FIND(List,C2)))-LOOKUP(BigNum,FIND(List,C2))),B2
)

...confirmed with CONTROL+SHIFT+ENTER, not just ENTER.