C
CCarter
Is there a way for me to change:
Smith, John and Jane
to:
John Smith Jane Smith
Thanks in advance,
Cathy
Smith, John and Jane
to:
John Smith Jane Smith
Thanks in advance,
Cathy
Is there a way for me to change:
Smith, John and Jane
to:
John Smith Jane Smith
Thanks in advance,
Cathy
Assuming all your "double names" are structured as shown (with the comma and
the word "and"), give these two formulas (which assume your names are in A1)
a try...
B1: =MID(A1,FIND(",",A1)+2,IF(ISERROR(FIND(" and ",A1)),LEN(A1)+1,FIND("
and ",A1))-FIND(",",A1)-2)&" "&LEFT(A1,FIND(",",A1)-1)
C1: =IF(ISERROR(FIND(" and ",A1)),"",MID(A1,FIND(" and ",A1)+4,99)&"
"&LEFT(A1,FIND(",",A1)-1))
You can then copy these down as required. By the way, these formulas should
work whether there is a second name attached with the word "and" in Column A
or not.
Rick
It does give an error if there's no comma. But ...
A suggestion, Rick:
Your formulas are multi-line and break on the <space> after the <">. I
have
found that if I break these long formulas in the formula bar, at an
appropriate
length, using <alt-enter>, I can then paste them into my newsreader and
they
can be copy/pasted directly back into a formula bar, and work with no
further
editing.
Hmm! Based on what the OP posted, it didn't seem likely that there would not
be a comma... the names appeared to be arranged as last-comma-first (plus
possibly a second name).
What would be listed if there was not comma...
I would think just a last name, or possibly a company name, or possibly
a mistake (in which case an error return would be appropriate).
What I posted would work for a last name only, not sure how you would
distinguish a mistake over a last name only (unless you meant that was the
mistake), but a company name has interesting consequence. Ford Motor Company
would work fine, but a little bit more problematic would be Apple, Inc.
Rick
It's amazing how complex a seemingly simple request can sometimes become.
I
guess part of that is because the problem is often not completely defined
in an
initial posting.