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))
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top