+ Reply to Thread
Results 1 to 4 of 4

Match X,Y point in list 1 to nearest X,Y point in list 2

  1. #1
    Registered User
    Join Date
    07-07-2016
    Location
    Kuwait
    MS-Off Ver
    2016
    Posts
    28

    Match X,Y point in list 1 to nearest X,Y point in list 2

    Hi,

    I have a long list of X,Y,Z map points and another, much shorter list, of X,Y target points. The target points will not exactly coincide with the map points. I want to take each target point and then match it to the nearest X,Y map point and return the Z value.

    The attached Excel sheet should make this clear.

    I thought this would be easy but have had problems, so would appreciate if anyone can provide some pointers!

    Thanks,

    Hamang
    Attached Files Attached Files

  2. #2
    Forum Expert Olly's Avatar
    Join Date
    09-10-2013
    Location
    Darlington, UK
    MS-Off Ver
    Excel 2016, 2019, 365
    Posts
    6,284

    Re: Match X,Y point in list 1 to nearest X,Y point in list 2

    In H16, enter:

    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Last edited by Olly; 06-19-2019 at 06:28 AM.
    let Source = #table({"Question","Thread", "User"},{{"Answered","Mark Solved", "Add Reputation"}}) in Source

    If I give you Power Query (Get & Transform Data) code, and you don't know what to do with it, then CLICK HERE

    Walking the tightrope between genius and eejit...

  3. #3
    Forum Expert XLent's Avatar
    Join Date
    10-13-2010
    Location
    Northumberland, UK
    MS-Off Ver
    various
    Posts
    2,706

    Re: Match X,Y point in list 1 to nearest X,Y point in list 2

    another option might be:

    =INDEX($C:$C,MOD(AGGREGATE(15,6,ABS(($A$2:$A$4296-$F16)+($B$2:$B$4296-$G16))*100000+ROW($A$2:$A$4296),1),100000))

  4. #4
    Registered User
    Join Date
    07-07-2016
    Location
    Kuwait
    MS-Off Ver
    2016
    Posts
    28

    Re: Match X,Y point in list 1 to nearest X,Y point in list 2

    Thanks Olly and XLent.

    I think both will be useful solutions. Olly's seems more accurate but takes quite a long time to run. This might be an issue as I have over 300,000 map points and a couple thousand target points! It takes several minutes on my (very old) machine to run 10 points. I'll try overnight and see what happens.
    XLent's doesn't get quite so close to the correct values - but is not too far away - and runs quickly.
    Thanks again.

    Hamang

+ 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. Rounding (to nearest half percentage point)
    By bxyanks20 in forum Excel General
    Replies: 3
    Last Post: 08-10-2016, 08:34 AM
  2. [SOLVED] Nearest Number match from a list of numbers from a different list
    By vba1234 in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 02-05-2016, 10:30 AM
  3. [SOLVED] Nearest neighbour limited by point type
    By Spicey_888 in forum Excel General
    Replies: 6
    Last Post: 05-09-2014, 08:26 AM
  4. Index/Match to find Starting Point of Average, Ending Point of Average Variable
    By tgentry in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 11-09-2012, 01:04 AM
  5. [SOLVED] Scatter Plot X Axis to the nearest point
    By vcodec in forum Excel Charting & Pivots
    Replies: 4
    Last Post: 08-07-2012, 09:57 AM
  6. [SOLVED] Rounding to the nearest quarter point?
    By George in forum Excel General
    Replies: 3
    Last Post: 06-10-2006, 05:15 PM
  7. get to a particular point in a dropdown list
    By Prema in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 05-24-2006, 05:50 AM

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