Find one character or another and display

  • Thread starter Thread starter c8tz
  • Start date Start date
C

c8tz

text string: xxx-23xz-34L or can be xxx-23exv-24R0

using the formula below, how do I put it such that if it finds an R
than it puts R else if L then it puts L.

IF((MID(G6,FIND("R",G6,1),1))="R","R","L")

trying the OR function but getting confused.

and the FIND({"R","L"}.... doesn't seem to work right.

Thanks for your help
 
How about this...

=IF(ISERROR(FIND("R",G6)),"L","R")

Of course, the usage of R and L must be confined to the characters after the last dash (where your example seems to show it has to be). If you can possibly have an R or L in one of the first two groupings of characters, then you will need a different formula.

Rick
 
Try something like:

=if(isnumber(find("R",a1)),"R",if(isnumber(find("L",a1)),"L","Neither"))

Regards,
Fred
 
Try something like:

=if(isnumber(find("R",a1)),"R",if(isnumber(find("L",a1)),"L","Neither"))

Regards,
Fred











- Show quoted text -

thanks heaps for both of your help. got what i wanted.
 
Back
Top