Reputation: 45
I want to check for a character in a string and if it matches I want to look up the value of that character from a table. e.g., I want to check a character F (A94) in the string HPCS (B63), if TRUE then the value 2 (B94) from the table (A34:B105) should be the outcome (at the position B65). If FALSE the value should be 0. Does anybody know how to do that in excel?
Upvotes: 2
Views: 623
Reputation: 37125
You can give a try to below formula. But P.B raise a good point in comment. You need to clarify that.
=IF(ISNUMBER(SEARCH(A3,$B$1)),INDEX($F$4:$F$14,MATCH(A3,$E$4:$E$14,0)),0)
Upvotes: 2