breaking down string help please

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I want to take the first 2 characters of a string to use in a code but if the
second character is ' as in o'brien i want to use the first and third
characters. how can i do this, Any help appreciated.

colm
 
IIf(Mid([MyString], 2, 1) = "'", Mid([MyString], 1, 1) & Mid([MyString], 3,
1), Left([MyString], 2))
 
Back
Top