jeffreybrown
Well-known Member
- Joined
- Jul 28, 2004
- Messages
- 5,152
Hi All,
I have a cell with i.e., 1C571 and based on the 4th number I would like to return a string (in this case it would be TS). Here is the formula I have come up with, but can't seem to get it to work. The MID function pulls the 7 but for the {5,7,9} I am getting {FALSE, FALSE, FALSE}. Maybe there is even a better way?
I have a cell with i.e., 1C571 and based on the 4th number I would like to return a string (in this case it would be TS). Here is the formula I have come up with, but can't seem to get it to work. The MID function pulls the 7 but for the {5,7,9} I am getting {FALSE, FALSE, FALSE}. Maybe there is even a better way?
Code:
=IF(OR(MID(D2,4,1)={5,7,9}),LOOKUP(MID(D2,4,1),{5,7,9},{"SS","TS","SMS"}),"")