I'm hoping someone can help me with a macro I'm trying to make. Basically what I'm trying to do is copy a bunch of text fields which contain names. The fields are in the format LastName, FirstName. What I want to do is copy the LastName into a variable and copy the FirstName into a different variable so then I can paste them into separate fields where I need them. So a quick example is a field: Doe, John. I would want to copy Doe into a variable and John into a different variable. Basically I need to copy the stuff before the comma, and then the stuff after the comma (not including the space).
Another problem with that is that sometimes the fields will be: Doe, John & Doe, Jane. In this case I would still just want to copy John for firstname and Doe for lastname and ignore the rest. Any ideas?
Copying fields with commas
in Macro Express 3.x
Posted
Hi all,
I'm hoping someone can help me with a macro I'm trying to make. Basically what I'm trying to do is copy a bunch of text fields which contain names. The fields are in the format LastName, FirstName. What I want to do is copy the LastName into a variable and copy the FirstName into a different variable so then I can paste them into separate fields where I need them. So a quick example is a field: Doe, John. I would want to copy Doe into a variable and John into a different variable. Basically I need to copy the stuff before the comma, and then the stuff after the comma (not including the space).
Another problem with that is that sometimes the fields will be: Doe, John & Doe, Jane. In this case I would still just want to copy John for firstname and Doe for lastname and ignore the rest. Any ideas?
Thanks for any help with this!!
-Gogi