Help parsing a delimited string

K

kidkosmo

Hi, All,

I need a little help with parsing a string in VBA. What I'm doing is
capturing user's NT Usernames in my database. I capture this by using
"strUser=fOSUsername". strUser is then captured as "john.a.doe". I'd
like to be able to switch that around to "Doe, John A" in one field
and not multiple fields (such as with the Split function).

Any help would be greatly appreciated.
 
K

KARL DEWEY

Try this --
Mid([YourString], InstrRev([YourString], ".")+1) & ", " &
Mid([YourString], Instr([YourString], ".")+1, InstrRev([YourString],
".")-Instr([YourString], ".")) & " " & LEFT([YourString], Instr([YourString],
".")-1)
 

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

Top