Results 1 to 3 of 3
  1. #1
    Bronze Lounger
    Join Date
    Jan 2001
    Posts
    1,418
    Thanks
    1
    Thanked 0 Times in 0 Posts
    In cell Z2 I have the text "New York to London" (without the quotes, of course), in Z3, "Boston to Miami", and in Z4 "Chicago to Houston" I would like to separate the contents of each cell such that in cell CB2 I would have "New York" and in CC2, "London", in CB3 I would have "Boston", and in CC3, "Miami", and in CB4 I would have "Chicago", and in CC4, "Houston". Any ideas? Thanks in advance.

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts
    In CB2: =LEFT(Z2,SEARCH(" to ",Z2)-1)
    In CC2: =RIGHT(Z2,LEN(Z2)-SEARCH(" to ",Z2)-3)

    Select CB2 and CC2, then fill down as far as needed.

  3. #3
    Bronze Lounger
    Join Date
    Jan 2001
    Posts
    1,418
    Thanks
    1
    Thanked 0 Times in 0 Posts
    [quote name='HansV' post='798391' date='16-Oct-2009 09:34']In CB2: =LEFT(Z2,SEARCH(" to ",Z2)-1)
    In CC2: =RIGHT(Z2,LEN(Z2)-SEARCH(" to ",Z2)-3)

    Select CB2 and CC2, then fill down as far as needed.[/quote]

    Thanks Hans; works fine!

Posting Permissions

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