These forums are now Read Only. If you have an Acrobat question, ask questions and get help from one of our experts.

Rearrange firstname/surname

PetafromOz
Registered: Jun 8 2009
Posts: 230

If I have a field in Excel that is structured thus...

Surname, Firstname (eg. Smith, John),

do you know a way to be able convert/transfer that information into fields that represent the First name first, then the surname last (ie. John Smith)?

from way... underground at Parkes - central West NSW - Australia

Freelancer
Registered: May 26 2009
Posts: 71
Hmmm... excel... acrobat...

=OIKEA(A1;(PITUUS(A1))-(KÄY.LÄPI(",";A1)))
=VASEN(A1;(KÄY.LÄPI(",";A1))-1)

this is from finnish version of excel, but
those are functions to handle text.
OIKEA is RIGHT, VASEN is LEFT, PITUUS is LEN,
KÄY.LÄPI is SEARCH...

Maybe you have to use also TRIM to
get rid off unnecessary spaces.

Freelancer

According to most IT HelpDesk people, the most common reason for user error (regardless of Operating System) is ID 10T.

gkaiseril
Expert
Registered: Feb 23 2006
Posts: 4308
In FormCalc syntax:
----- form1.#subform[0].FirstLast::calculate: - (FormCalc, client) ---------------------------------// string to processvar sLastFirst = "Smith, John"// length of the stringvar fLen = Len(LastFirst)// find position of coma space separatorvar fComa = At(sLastFirst, ", ")// get last name sub stringvar sLast = Substr(sLastFirst, 1, fComa - 1)// get first name sub stringvar sFirst = Substr(sLastFirst, fComa + 2, fLen)// build formatted string of first and last nameConcat(sFirst, " ", sLast)

George Kaiser

PetafromOz
Registered: Jun 8 2009
Posts: 230
Wow, I get this is 2 languages. I'll give both a go. Thanks heaps.

from way... underground at Parkes - central West NSW - Australia