+ Reply to Thread
Results 1 to 7 of 7

Sorting cells with coordinates to match in different columns

  1. #1
    Registered User
    Join Date
    11-11-2021
    Location
    Swweden
    MS-Off Ver
    2016
    Posts
    4

    Sorting cells with coordinates to match in different columns

    Hello,

    Data1 x y z Data2 x y z
    1 1 2 0,2 1 1 -2 0,1
    2 1 -2 0,1 2 1 2 0,2
    3 2 -3 -0,1 3 5 1 -0,5
    4 5 1 -0,5 4 0,5 3 -0,1
    5 0,5 3 -0,1 5 2 -3 -0,1

    Now what I want to do is to match the x,y,z, coordinates to find out which Data1 ID corresponds to which Data2 ID, i.e. I want to sort it like this

    Data1 x y z Data2 x y z
    5 0,5 3 -0,1 4 0,5 3 -0,1
    2 1 -2 0,1 1 1 -2 0,1
    1 1 2 0,2 2 1 2 0,2
    3 2 -3 -0,1 5 2 -3 -0,1
    4 5 1 -0,5 3 5 1 -0,5

    Any ideas on how to do this? Sorting just operates on one column, so I can sort it with respect to i,e, x-coordinate, but not the other columns.

    Thanks

    Best regards
    Björn

  2. #2
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,460

    Re: Sorting cells with coordinates to match in different columns

    Welcome to the forum.

    There are instructions at the top of the page explaining how to attach your sample workbook.

    A good sample workbook has just 10-20 rows of representative that has been desensitised. It also has expected results mocked up, relevant cells highlighted and a few explanatory notes.
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  3. #3
    Registered User
    Join Date
    11-11-2021
    Location
    Swweden
    MS-Off Ver
    2016
    Posts
    4

    Re: Sorting cells with coordinates to match in different columns

    I did create one, but couldnt attach it for some reason. Trying again now.
    Attached Files Attached Files

  4. #4
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,152

    Re: Sorting cells with coordinates to match in different columns

    Select the data including headings>>Custom Sort>>by Field X .. smallest to largest ..Add Field Y .. Smallest to largest
    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED.

  5. #5
    Registered User
    Join Date
    11-11-2021
    Location
    Swweden
    MS-Off Ver
    2016
    Posts
    4

    Re: Sorting cells with coordinates to match in different columns

    Quote Originally Posted by JohnTopley View Post
    Select the data including headings>>Custom Sort>>by Field X .. smallest to largest ..Add Field Y .. Smallest to largest
    That is what I first tried to do, but still doesn't seem to work...but I am having a thought it may be due to roundoff errors from the software producing the scalar fields. But in general, sorting it like that, should work right?

  6. #6
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,152

    Re: Sorting cells with coordinates to match in different columns

    See attached.
    Attached Files Attached Files

  7. #7
    Registered User
    Join Date
    11-11-2021
    Location
    Swweden
    MS-Off Ver
    2016
    Posts
    4

    Re: Sorting cells with coordinates to match in different columns

    Thanks. It seems that the error lies in the data points. I need to figure out a different way to do this.

+ 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. I need a hand in sorting continuously xy coordinates on the same route
    By Salamash in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 10-02-2018, 02:07 PM
  2. Sorting multiple columns to match while perserving unique entries
    By 91d473f78f in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 03-26-2016, 05:26 PM
  3. Sorting Node Coordinates of a Circle
    By babebull82 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 03-15-2016, 10:24 AM
  4. Macro - If cells in columns A-N match then combine cells in columns O,P,Q
    By TAMMY32 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 04-01-2015, 01:40 PM
  5. Replies: 2
    Last Post: 07-03-2013, 06:17 PM
  6. Sorting several columns based on match between A and B - excel 2010
    By looserst in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 03-29-2013, 09:32 PM
  7. Replies: 1
    Last Post: 08-10-2006, 10:50 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