+ Reply to Thread
Results 1 to 8 of 8

Matching 2 columns and sorting so they line up.

  1. #1
    Forum Contributor
    Join Date
    08-23-2012
    Location
    UK
    MS-Off Ver
    Excel 2010
    Posts
    128

    Matching 2 columns and sorting so they line up.

    I have 2 large datasheets. Both contain a Postcode column. I would like to get both these seperate sheets to match up by postcode (since that is the only column which appears in both).
    I know about conditional formatting which is all great, but how do I get the postcodes to match up and will sort the 2nd or 1st sheet by the postcode column so they all align?

    For example, currently the postcodes on each sheet are:

    column A from one datasheet, column b from another:
    Please Login or Register  to view this content.

    I would like the data to line up, arranging by other columns just so the post code matches up.

    Please Login or Register  to view this content.
    I hope all that makes sense.
    I cant just arrange by postcode on both, because one sheet has more/less information than the other and if one list contains a single extra postcode, everything is thrown off. Hence this cry for help.

  2. #2
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Matching 2 columns and sorting so they line up.

    Hi,

    You appear to be saying that it's column B from the second sheet that contains the correct colour in column C of the same second sheet. In which case why not use a VLOOKUP()
    In column B of sheet 1 enter

    Formula: copy to clipboard
    Please Login or Register  to view this content.

    and in column C of sheet1

    Formula: copy to clipboard
    Please Login or Register  to view this content.


    otherwise upload your workbook and clarify your request.
    Richard Buttrey

    RIP - d. 06/10/2022

    If any of the responses have helped then please consider rating them by clicking the small star icon below the post.

  3. #3
    Forum Contributor
    Join Date
    08-23-2012
    Location
    UK
    MS-Off Ver
    Excel 2010
    Posts
    128

    Re: Matching 2 columns and sorting so they line up.

    Hi

    What I mean is, sheet 2 contains postcodes. Most, not all, are the same on sheet one but sheet 2 contains about 5 other columns. Sheet 1 contains 5 different columns also, the only thing similar in both is the postcode column.
    I want to copy over all data from the 2nd sheet, I then want the 2 postcode columns to match up so all 10 columns have accurate information. I could then delete the extra postcode column as I will no longer need it. I can't really post any sheets here, due to the information it contains.

  4. #4
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Matching 2 columns and sorting so they line up.

    I think you'd better upload the actual workbook.

    Manually add examples of the results you expect to see and clearly identify which are the result cells and which is the original data from which the results are derived.

  5. #5
    Forum Contributor
    Join Date
    08-23-2012
    Location
    UK
    MS-Off Ver
    Excel 2010
    Posts
    128

    Re: Matching 2 columns and sorting so they line up.

    I've attached an example. I hope it makes sense.
    The first line of the spreadsheet reads,

    I need columns EEN and E11 to line up. For example, EEN code 010 should be AAA. But in this example is it AAM.

    It should read

    I need columns EEN and E11 to line up. For example, EEN code 010 should be AAM. But in this example is it AAJ.
    Attached Files Attached Files
    Last edited by X82; 11-23-2015 at 07:09 AM.

  6. #6
    Forum Expert
    Join Date
    03-28-2012
    Location
    TBA
    MS-Off Ver
    Office 365
    Posts
    12,454

    Re: Matching 2 columns and sorting so they line up.

    I do not know which sheet do you want to use to paste all columns plus if you want to clear the data in sheet1. The code pastes the data in sheet1 column c
    Attached Files Attached Files

  7. #7
    Forum Contributor
    Join Date
    08-23-2012
    Location
    UK
    MS-Off Ver
    Excel 2010
    Posts
    128

    Re: Matching 2 columns and sorting so they line up.

    Im not too bothered about pasting per se, I can do that part manually.
    I am at work at the moment. Are you able to post what code is in the attachment so I can try it here?

  8. #8
    Forum Expert
    Join Date
    03-28-2012
    Location
    TBA
    MS-Off Ver
    Office 365
    Posts
    12,454

    Re: Matching 2 columns and sorting so they line up.

    No, what I meant: Do you want to clear/delete the data in either sheet, so you have merged data only?
    Please Login or Register  to view this content.
    Attached Files Attached Files
    Last edited by AB33; 11-23-2015 at 09:47 AM.

+ 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. Need Help Matching and sorting multiple columns
    By KA1485 in forum Excel General
    Replies: 2
    Last Post: 03-13-2014, 01:44 PM
  2. [SOLVED] [Help] Sorting Two Data columns/matching [Help]
    By Mattymul in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 09-25-2013, 01:06 PM
  3. Matching and Sorting with Two Columns
    By KaySwiss9 in forum Excel General
    Replies: 8
    Last Post: 07-26-2013, 02:22 AM
  4. Replies: 3
    Last Post: 06-09-2011, 05:58 AM
  5. Sorting and Matching Two Columns in Multiple Steps
    By macfarlane.a in forum Excel General
    Replies: 2
    Last Post: 10-26-2010, 08:39 PM
  6. Matching and sorting Data from two different columns?
    By floppychicken in forum Excel General
    Replies: 1
    Last Post: 08-16-2010, 08:44 AM
  7. [SOLVED] Sorting columns and Matching
    By Jeremy in forum Excel General
    Replies: 2
    Last Post: 07-21-2006, 03:00 AM
  8. Line matching names in two seperate columns
    By eskapetoreality in forum Excel General
    Replies: 0
    Last Post: 04-17-2005, 07:10 PM

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