+ Reply to Thread
Results 1 to 10 of 10

Compare two List and Sort matched values

  1. #1
    Forum Contributor
    Join Date
    11-10-2012
    Location
    istanbul
    MS-Off Ver
    Excel 2013
    Posts
    297

    Compare two List and Sort matched values

    I have 2 Data Lists, want to make compare and sort as matched values.
    So, I need to find a solution with a formula or maybe Macro.(Formula is preferred)
    At the attached file you will find the detail.

    Thanks in advance for reply.

    Regards,
    Attached Files Attached Files

  2. #2
    Forum Expert Alf's Avatar
    Join Date
    03-13-2004
    Location
    Gothenburg/Mullsjoe, Sweden
    MS-Off Ver
    Excel 2019 and not sure I like it
    Posts
    4,758

    Re: Compare two List and Sort matched values

    I need to find a solution with a formula or maybe Macro.(Formula is preferred)
    Not sure you could do that with a formula but I could be wrong. In the meantime I've written a macro solution.

    Alf
    Attached Files Attached Files

  3. #3
    Forum Contributor
    Join Date
    11-10-2012
    Location
    istanbul
    MS-Off Ver
    Excel 2013
    Posts
    297

    Re: Compare two List and Sort matched values

    Quote Originally Posted by Alf View Post
    Not sure you could do that with a formula but I could be wrong. In the meantime I've written a macro solution.

    Alf
    Dear Alf,
    Thanks for prompt reply. But, if you check the attached file, your solution was not sufficient to solve the differrent cases.

    If possible, could you renew the code according to cases attached.

    Regards,
    turist
    Attached Files Attached Files

  4. #4
    Forum Expert Alf's Avatar
    Join Date
    03-13-2004
    Location
    Gothenburg/Mullsjoe, Sweden
    MS-Off Ver
    Excel 2019 and not sure I like it
    Posts
    4,758

    Re: Compare two List and Sort matched values

    your solution was not sufficient to solve the differrent cases.
    A macro is “build to order” i.e. what you ask for is what you get. As to that the macro could not solve the different cases is a bit like asking somebody to build you a 5 meter long bridge and then complaining that you can’t use it on a 10 or a 15 meter wide river.

    The better you describe the problem with an uploaded example file the better solution to your problem you will get.

    I’ve made an update but also made some changes i.e. I’ve put the 3 cases side by side as this makes it easier for me (after all you get my time and effort free of charge). The macro starts by sorting all lists in the 3 cases in an ascending order before it proceeds to insert the empty cells.

    Alf
    Attached Files Attached Files

  5. #5
    Forum Contributor
    Join Date
    11-10-2012
    Location
    istanbul
    MS-Off Ver
    Excel 2013
    Posts
    297

    Re: Compare two List and Sort matched values

    Quote Originally Posted by Alf View Post
    A macro is “build to order” i.e. what you ask for is what you get. As to that the macro could not solve the different cases is a bit like asking somebody to build you a 5 meter long bridge and then complaining that you can’t use it on a 10 or a 15 meter wide river.

    The better you describe the problem with an uploaded example file the better solution to your problem you will get.

    I’ve made an update but also made some changes i.e. I’ve put the 3 cases side by side as this makes it easier for me (after all you get my time and effort free of charge). The macro starts by sorting all lists in the 3 cases in an ascending order before it proceeds to insert the empty cells.

    Alf

    Dear Alf,
    Thanks for your time and effort.
    Sorry, I didn't know if I pay any fee for your help.
    If I have to , please don't hesitate to charge.
    Regards,

  6. #6
    Forum Expert Alf's Avatar
    Join Date
    03-13-2004
    Location
    Gothenburg/Mullsjoe, Sweden
    MS-Off Ver
    Excel 2019 and not sure I like it
    Posts
    4,758

    Re: Compare two List and Sort matched values

    No, of course not any fee to pay! Just me grumbling a bit! Sorry about that. Hopefully the macro can be of use to you.

    Alf

  7. #7
    Forum Contributor
    Join Date
    11-10-2012
    Location
    istanbul
    MS-Off Ver
    Excel 2013
    Posts
    297

    Re: Compare two List and Sort matched values

    Quote Originally Posted by Alf View Post
    No, of course not any fee to pay! Just me grumbling a bit! Sorry about that. Hopefully the macro can be of use to you.

    Alf
    Dear Alf,
    I will try to modify the codes to my real file.

    Thank you very much.

  8. #8
    Forum Expert Alf's Avatar
    Join Date
    03-13-2004
    Location
    Gothenburg/Mullsjoe, Sweden
    MS-Off Ver
    Excel 2019 and not sure I like it
    Posts
    4,758

    Re: Compare two List and Sort matched values

    You are welcome but why don't you upload the real file? Unless of course it contains "sensitive" information.

    Alf

  9. #9
    Forum Contributor
    Join Date
    11-10-2012
    Location
    istanbul
    MS-Off Ver
    Excel 2013
    Posts
    297

    Re: Compare two List and Sort matched values

    Quote Originally Posted by Alf View Post
    You are welcome but why don't you upload the real file? Unless of course it contains "sensitive" information.

    Alf
    Real file is very heavy (10 mb)and also including very complex columns and formula.
    Insted of uploading, trying to adapt the macro into file structure.
    Thanks for your kind interest.

    Regards,

  10. #10
    Forum Expert Alf's Avatar
    Join Date
    03-13-2004
    Location
    Gothenburg/Mullsjoe, Sweden
    MS-Off Ver
    Excel 2019 and not sure I like it
    Posts
    4,758

    Re: Compare two List and Sort matched values

    Ok, best of luck in solving your problem and if you really get stuck you could try uploading your file to one of the sites that lets you upload files for free and post a link in this forum with a request for help.

    I've added a link for a number of sites where you can upload to:
    http://filesharefreak.com/2009/08/26...g-upload-sites

    Regards

    Alf

+ 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