+ Reply to Thread
Results 1 to 2 of 2

Text to Columns

  1. #1
    Registered User
    Join Date
    08-02-2007
    Posts
    1

    Text to Columns

    Hi,

    I have the following address text in a single column, which I need to strip out into 3 columns for database import. The text string example is:

    12th floor TD Centre 201 Portage Avenue PO Box 6600 Winnipeg, MB R3C 3A7 Canada

    I can strip out the "Canada" and the State/postcode: "R3C 3A7" by using several =right commands, but I need to separate out the City "Winnipeg" separately and then everything else to the left of the "," as a separate single column. This comma is the only indicator to break out the address data. Therefore it should look like this: (in for separate columns)

    12th floor TD Centre 201 Portage Avenue PO Box 6600 | Winnipeg | MB | R3C3A7 | Canada

    Hoping someone can help. Thanks.

  2. #2
    Valued Forum Contributor
    Join Date
    09-23-2005
    Location
    Bristol, UK
    MS-Off Ver
    2007
    Posts
    664
    Hi,

    If the province is always Winnipeg, and the full address is in A1, then the following should give you everything before "Winnipeg":

    =LEFT(A1,FIND("Winnipeg",A1,1)-1)

    HTH,

    SamuelT

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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.6.0 RC 1