PDA

View Full Version : Solved: LHS and RHS of Comma



IrishCharm
11-02-2010, 03:26 AM
Hi,

I was wondering if there is a code that I can use in a cell formula that will take everything to the LHS of a comma and then a different code that will take everything to the RHS of a comma?

I have tried different variaitions of length of cells to try isolate the comma but this is becoming huge formula and crashes and only works for 6-8 characters in length.

Any ideas would be appreciated

Thanks

Sarah

:cloud9:


Current:
Bloggs,Joe
SMith,Anna

Want:
Bloggs
Joe
Smith
Anna

Bob Phillips
11-02-2010, 04:54 AM
You could use

=LEFT(A2,FIND(",",A2)-1)

and

=RIGHT(A2,Len(A2)-FIND(",",A2))

but a better way is to do Data>Text To Columns with a comma delimiter