Link to home
Start Free TrialLog in
Avatar of Computer Guy
Computer Guy

asked on

Excel Remove Comma

Hi,

Some cells have a one name artist such as Journey, where others have Clapton, Eric (Row A)

How can I do an =(A1code) that I can run on Row B (even single named artists) to make it

Journey              Journey
Clapton, Eric     Eric Clapton
Avatar of Rgonzo1971
Rgonzo1971

Hi

you could try this formula

=IF(ISERROR(SEARCH(",",A1)),A1,MID(A1,SEARCH(",",A1)+2,LEN(A1))&" "&LEFT(A1,SEARCH(",",A1)-1))

Open in new window


or XL 2007 and further
=IFERROR(MID(A1,SEARCH(",",A1)+2,LEN(A1))&" "&LEFT(A1;SEARCH(",",A1)-1),A1)

Open in new window


Regads
You can use the FIND method wrapped in an ISERROR method, something like:
=IFERROR(LEFT(A1, FIND(",", A1)), A1)
=SUBSTITUTE(A1,",","")
And drag down as far as necessary.
Avatar of Computer Guy

ASKER

I like this: =SUBSTITUTE(A1,",","")

But how do I make Morrison, Van into Van Morrison
Sorry missed that part.
=SUBSTITUTE(MID(A1&" "&A1,FIND(" ",A1)+1,LEN(A1)),",","")
If it is a one word band like Journey, it shows up with #VALUE!

If it is a 3 word band like Black Eyed Peas, it shows up as Eyed Peas Black

Is there a way to ignore those kinds?
Go with Rgonzo1971's solution.

If you're interested I can give you a VBA solution.
Sure.
ASKER CERTIFIED SOLUTION
Avatar of Joe Howard
Joe Howard
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial