+ Reply to Thread
Results 1 to 3 of 3

Extract Postcode from free test and sort by it

  1. #1
    Registered User
    Join Date
    09-03-2010
    Location
    London, UK
    MS-Off Ver
    Excel 20037
    Posts
    1

    Extract Postcode from free test and sort by it

    Hi all,

    I've got a huge spreadsheet with customer account numbers, names, and addresses, and unfortunately all the addresses are entered as free text. All of the addresses are in the UK, and basically, I need to extract the postcodes from the free text addresses and sort all of the data by postcode.

    Any ideas?

  2. #2
    Forum Expert Domski's Avatar
    Join Date
    12-14-2009
    Location
    A galaxy far, far away
    MS-Off Ver
    Darth Office 2010
    Posts
    3,950

    Re: Extract Postcode from free test and sort by it

    Hi,

    A sample workbook would help with some examples of different formats if they vary.

    Dom
    "May the fleas of a thousand camels infest the crotch of the person who screws up your day and may their arms be too short to scratch..."

    Use code tags when posting your VBA code: [code] Your code here [/code]

    Remember, saying thanks only takes a second or two. Click the little star to give some Rep if you think an answer deserves it.

  3. #3
    Valued Forum Contributor blane245's Avatar
    Join Date
    02-20-2009
    Location
    Melbourne, FL
    MS-Off Ver
    Excel 2010
    Posts
    649

    Re: Extract Postcode from free test and sort by it

    I checked in Wikipedia on the definition of the UK postal codes. If you look here you will find a table of the various formats of the postal codes. This can be used to construct various regular expressions that you can use to search the address string to see if there any matches. If you like that approach, I can help you construct the code using regular expressions that will get you you need.
    Bob
    Click my star if my answer helped you. Mark the thread as [SOLVED] if it has been.

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