View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Rick Rothstein \(MVP - VB\) Rick Rothstein \(MVP - VB\) is offline
external usenet poster
 
Posts: 2,202
Default Find one character or another and display

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


"c8tz" wrote in message ...

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