Consulting

Results 1 to 2 of 2

Thread: Solved: LHS and RHS of Comma

  1. #1

    Solved: LHS and RHS of Comma

    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




    Current:
    Bloggs,Joe
    SMith,Anna

    Want:
    Bloggs
    Joe
    Smith
    Anna

  2. #2
    Distinguished Lord of VBAX VBAX Grand Master Bob Phillips's Avatar
    Joined
    Apr 2005
    Posts
    25,445
    Location
    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
    ____________________________________________
    Nihil simul inventum est et perfectum

    Abusus non tollit usum

    Last night I dreamed of a small consolation enjoyed only by the blind: Nobody knows the trouble I've not seen!
    James Thurber

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •