Re: if statements with multiple returns



Assuming that the string of interest is in A2 and the list of specific text bits are (adjust to suit): "ip","iv","dp","dv","fi",and "xi"...

Try in B2:

=LOOKUP(9.99999999999999E+307,SEARCH({"Not Found","ip","iv","dp","dv","fi","xi"},"Not Found"&MID(A2,14,2)),
{"Not Found","ip","iv","dp","dv","fi","xi"})

Note "Not Found" which is added to the preset list of bits of text.


Batman wrote:
Hi someone,

I'm trying to find and return specific text (the 14th and 15th character) from a cell, but only if its one of 6 different values (ex. "ip" or "iv")

can someone provide a formula that could return only these 2 values, and i should be ok to replicate it from there??

Thanks,
.



Relevant Pages

  • Re: if statements with multiple returns
    ... liking, then copy the formula down if you have similar strings to test ... "Batman" wrote: ... should be ok to replicate it from there?? ...
    (microsoft.public.excel.worksheet.functions)
  • Re: if statements with multiple returns
    ... liking, then copy the formula down if you have similar strings to test ... "Batman" wrote: ... I'm trying to find and return specific text (the 14th and 15th character) ... should be ok to replicate it from there?? ...
    (microsoft.public.excel.worksheet.functions)
  • [TOMOYO #15 3/8] Common functions for TOMOYO Linux.
    ... This file contains common functions (e.g. policy I/O, pattern matching). ... Since TOMOYO Linux is a name based access control, ... TOMOYO Linux's string manipulation functions make reviewers feel crazy, ... the Linux kernel accepts all characters but NUL character ...
    (Linux-Kernel)
  • RfD: Escaped Strings version 4
    ... the S" string can only contain printable characters, ... the S" string cannot contain the '"' character, ... as an escape character for the entry of characters that cannot be ... \b BS (backspace, ASCII 8) ...
    (comp.lang.forth)
  • RfD: Escaped Strings version 4
    ... the S" string can only contain printable characters, ... the S" string cannot contain the '"' character, ... as an escape character for the entry of characters that cannot be ... \b BS (backspace, ASCII 8) ...
    (comp.lang.forth)