+ Reply to Thread
Results 1 to 3 of 3

HELP! Need to Sort Customer Address List into Postcode Order

  1. #1
    Registered User
    Join Date
    10-12-2015
    Location
    Bradford
    MS-Off Ver
    2010
    Posts
    1

    Exclamation HELP! Need to Sort Customer Address List into Postcode Order

    Good Morning All,

    I have been assigned a task @ work and I need to sort a rather large list of customers into post code order. Ideally, so the relevant person can skim down the list and pick out the closest customer to him at that moment.

    I have had to extract data from our system at work to provide the customer list in an excel format, however, the data is a bit of a mess with extra columns and rows everywhere. (See below).

    CUSTOMER BY POSTCODE.xlsx

    Can anyone provide any suggestions on how I can get my head around this? I have x4 to do for each area in the UK we cover.

    Yours, hopefully,
    Sam

  2. #2
    Forum Expert
    Join Date
    03-23-2004
    Location
    London, England
    MS-Off Ver
    Excel 2019
    Posts
    7,065

    Re: HELP! Need to Sort Customer Address List into Postcode Order

    If that's the full file it's probably quicker to just copy the postcodes to a separate cell, there's only 587 rows and some of those are blank.
    Regards
    Special-K

    Ensure you describe your problem clearly, I have little time available to solve these problems and do not appreciate numerous changes to them.

  3. #3
    Forum Expert
    Join Date
    03-20-2015
    Location
    Primarily UK, sometimes NL
    MS-Off Ver
    Work: Office 365 / Home: Office 2010
    Posts
    2,405

    Re: HELP! Need to Sort Customer Address List into Postcode Order

    Here's one way of doing it, though it's a bit long-winded and so I'm not sure it's any quicker than doing a manual copy-and-paste as Special-K suggested.

    1. Get rid of all the merged cells by selecting the entire sheet (click the grey area to the left of A and above 1 with a darker grey triangle in it), then click to de-select the 'Merge and Centre' button in the 'Alignment' section of the 'Home' tab.

    2. Enter two new columns after column G - new columns H and I.

    3. In H7, enter this:
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    4. In I7, enter this:
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    (3) and (4) together will change the vertically-arranged addresses into horizontally-arranged ones. (If all you have is a postcode, it'll be duplicated in columns G and I.)

    5. Select H7:I9 (both columns, three rows). Using the 'drag handle' at the bottom-right of the selection, drag down to the bottom of your data (row 588).

    6. Select H7:I588 and copy, then right-click in the selection and click 'Paste Values' (the symbol which looks like a clipboard with '123' on it, under 'Paste Options'). Press 'Esc' to de-select the area.
    This replaces the formulae from (3) and (4) above with their results.

    7. Select B7:B588 (the column with the heading 'A/C'). Do not select the entire column. Press F5, then click 'Special', then select 'Blanks' and click 'OK'.
    This will select all the rows which are blank in this column. On the 'Home' tab, in the 'Cells' section, click 'Delete' and then 'Delete Sheet Rows'.

    You now have a table with everything for each company on one row, with postcodes in column I. Sort it as you want.

    (It's undoubtedly possible to write a macro to do all of this, but I'm not good enough in VBA to do it. If all your files are identical, you might be able to record the above the first time and copy the recorded macro to run on the other files, but I suspect the row numbers will be different at the very least.)

    Good luck.
    Regards,
    Aardigspook

    I recently started a new job so am a bit busy and may not reply quickly. Sorry - it's not personal - I will reply eventually.
    If your problem is solved, please go to 'Thread Tools' above your first post and 'Mark this Thread as Solved'.
    If you use commas as your decimal separator (1,23 instead of 1.23) then please replace commas with semi-colons in your formulae.
    You don't need to give me rep if I helped, but a thank-you is nice.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] Using Data Validation List to update customer address list
    By Rosco88 in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 01-29-2014, 10:27 AM
  2. [SOLVED] Sort postcode list alphabeically and numerically
    By Mikey7346 in forum Excel - New Users/Basics
    Replies: 2
    Last Post: 08-08-2013, 11:43 AM
  3. Replies: 0
    Last Post: 04-12-2013, 02:28 AM
  4. [SOLVED] Help needed trimming full postcode address to postcode sector.
    By Mikey7346 in forum Excel - New Users/Basics
    Replies: 5
    Last Post: 08-10-2012, 05:11 PM
  5. Replies: 2
    Last Post: 12-05-2011, 01:27 PM
  6. Replies: 0
    Last Post: 04-01-2011, 12:10 PM
  7. populate the daily list against customer order
    By Lauracun in forum Excel General
    Replies: 2
    Last Post: 04-07-2008, 07:08 AM
  8. [SOLVED] customer sort order in a marco
    By Dennis Cheung in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 05-12-2005, 08:06 AM

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