+ Reply to Thread
Results 1 to 5 of 5

Thread: formulas to split text cells

  1. #1
    Registered User
    Join Date
    09-22-2011
    Location
    Monsey, New YOrk
    MS-Off Ver
    Excel 2003
    Posts
    2

    formulas to split text cells

    I have an address field that needs to be split in 2. Now the field contains the house number street comma suite # (ex: 21 Main Street, Suite 25). I would like to separate it, by the comma, so the adress1 would be 21 Main Street and Adress 2 would be suite 21.
    I think I need 2 formulas:
    1. So far I have =LEFT(F2,SEARCH(",",F2,1 )-1 ), so address 1 shows the house number and street, without the comma. The problem is that there are some addresses without suites and without commas. I get an error in those rows. In this case, I need the formula to just copy the contents of the original cell.
    2. I need a formuls to get the Suite # out of the original cell and into the cell labeled address2.
    Thanks

  2. #2
    Valued Forum Contributor
    Join Date
    10-13-2010
    Location
    Sunderland, England
    MS-Off Ver
    Excel 2007 (Home) / 2003 (Work)
    Posts
    567

    Re: formulas to split text cells

    Is there a reason you can't use the text to columns feature, or is this something you're unaware of? Seems like a much simpler solution to your problem.

  3. #3
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    MS 2007
    Posts
    5,372

    Re: formulas to split text cells

    1. So far I have =LEFT(F2,SEARCH(",",F2,1 )-1 ), so address 1 shows the house number and street, without the comma. The problem is that there are some addresses without suites and without commas. I get an error in those rows. In this case, I need the formula to just copy the contents of the original cell.
    Try =LEFT(F2,SEARCH(",",F2&",",1 )-1 )
    2. I need a formuls to get the Suite # out of the original cell and into the cell labeled address2.
    =MID(F2,SEARCH(",",F2&",")+2,30) I used "+2" because in your example, there is a space between your comma and your suite.
    Does this work for you?

    PS. Broken Biscuits' idea is probably better.
    ChemistB
    My 2¢

    Don't forget to mark threads as "Solved" (Edit First post>Advanced>Change Prefix)
    If I helped, Don't forget to add to my reputation (click on the little star at bottom of this post)

  4. #4
    Registered User
    Join Date
    09-22-2011
    Location
    Monsey, New YOrk
    MS-Off Ver
    Excel 2003
    Posts
    2

    Re: formulas to split text cells

    FORGET THIS QUESTION-I found a built in wizard to do it

  5. #5
    Valued Forum Contributor
    Join Date
    10-13-2010
    Location
    Sunderland, England
    MS-Off Ver
    Excel 2007 (Home) / 2003 (Work)
    Posts
    567

    Re: formulas to split text cells

    That'll be the text to columns feature then?

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.2.0