+ Reply to Thread
Results 1 to 7 of 7

Finding the closest value with multiple criteria

  1. #1
    Registered User
    Join Date
    02-27-2016
    Location
    Indiana
    MS-Off Ver
    8
    Posts
    4

    Finding the closest value with multiple criteria

    I have two data sets. One is the "planned" coordinate (X & Y, i.e. 2 numbers in two columns) and the other is an "actual" coordinate in random order.

    I would like to match the "actual" coordinates to the "planned" coordinates. This to me sounds like the index and match function with multiple criteria. The challenge for me is writing a formula where the "actual" coordinates my be slightly different. See data example:

    PLANNED ACTUAL
    ID X Y Z X Y Z
    600 4755.97 1825.91 15.68 4756.68 1625.42 14.91
    601 4756.47 1805.63 15.80 4756.50 1725.53 15.55
    602 4756.56 1785.55 15.76 4756.87 1565.46 15.45
    603 4756.51 1765.56 15.68 4756.77 1605.43 14.85
    604 4756.47 1745.64 15.61 4756.86 1585.47 14.90
    605 4756.52 1725.52 15.54 4756.55 1685.60 15.43
    606 4756.50 1705.53 15.51 4755.98 1825.90 15.67
    607 4756.54 1685.56 15.43 4756.91 1545.52 15.61
    608 4756.77 1665.56 14.98 4756.85 1525.51 15.85
    609 4756.74 1645.58 15.32 4747.11 1525.35 15.55
    610 4756.70 1625.43 14.90 4747.17 1545.39 15.43
    611 4756.77 1605.41 14.86 4747.02 1565.35 15.32
    612 4756.87 1585.43 14.89 4756.77 1665.56 14.97
    613 4756.88 1565.47 15.44 4756.74 1645.58 15.31
    614 4756.93 1545.52 15.61 4756.49 1705.53 15.51
    615 4756.89 1525.52 15.85 4756.47 1745.63 15.61
    616 4747.15 1525.37 15.54 4756.57 1785.55 15.75
    617 4747.17 1545.40 15.39 4756.50 1765.56 15.68
    618 4747.06 1565.37 15.30 4756.48 1805.65 15.80

    Over all I would like to search the "actual" X & Y and possibly Z and match it to the closest "planned" XYZ resulting with assigning the "actual" XYZ the corresponding I.D. so I calculate the difference between the two.
    Thanks for the help.

  2. #2
    Forum Expert Crooza's Avatar
    Join Date
    10-19-2013
    Location
    Hunter Valley, Australia
    MS-Off Ver
    Excel 2003 /7/10
    Posts
    2,082

    Re: Finding the closest value with multiple criteria

    Hi and welcome

    I assumed your data commenced in A2

    Put his formula in say I2 and enter with Control + Shift + enter as its an array formula (You will get squiggly brackets around the formula {})then drag across two more columns and drag down to row 20 and you'll get the closest x,y,z spatially to your original x,y,z values.

    Please Login or Register  to view this content.
    Edit - just amended formula slightly
    Last edited by Crooza; 03-27-2016 at 10:39 PM.
    Happy with my advice? Click on the * reputation button below

  3. #3
    Forum Expert Crooza's Avatar
    Join Date
    10-19-2013
    Location
    Hunter Valley, Australia
    MS-Off Ver
    Excel 2003 /7/10
    Posts
    2,082

    Re: Finding the closest value with multiple criteria

    Oh and you'll notice too that some points are closest to two originals. Mathematically this is correct but wasn't sure if you can only have 1 match for each set of coordinates.

  4. #4
    Registered User
    Join Date
    02-27-2016
    Location
    Indiana
    MS-Off Ver
    8
    Posts
    4

    Re: Finding the closest value with multiple criteria

    My example would be cleaner if I could copy and paste the actual excel with columns and rows. Any suggest on how to accomplish this?

  5. #5
    Forum Expert Crooza's Avatar
    Join Date
    10-19-2013
    Location
    Hunter Valley, Australia
    MS-Off Ver
    Excel 2003 /7/10
    Posts
    2,082

    Re: Finding the closest value with multiple criteria

    Did you try my solution?

  6. #6
    Registered User
    Join Date
    02-27-2016
    Location
    Indiana
    MS-Off Ver
    8
    Posts
    4
    Quote Originally Posted by Crooza View Post
    Did you try my solution?
    Not yet ... But I'll let you know as soon as I can try it out!

  7. #7
    Forum Expert Crooza's Avatar
    Join Date
    10-19-2013
    Location
    Hunter Valley, Australia
    MS-Off Ver
    Excel 2003 /7/10
    Posts
    2,082

    Re: Finding the closest value with multiple criteria

    Ok. The way I read your post was that it didn't work for you

+ 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. Replies: 3
    Last Post: 06-12-2015, 10:33 AM
  2. Excel Formula: Get the closest value with multiple criteria
    By vinzdd in forum Outlook Formatting & Functions
    Replies: 1
    Last Post: 05-14-2015, 11:04 PM
  3. Finding closest with multiple criteria
    By anwi12ad in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 05-04-2015, 06:42 AM
  4. [SOLVED] Multiple criteria (finding closest)
    By jram in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 03-20-2015, 12:02 AM
  5. [SOLVED] Closest match on Multiple Criteria
    By rbetts in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 04-20-2014, 08:33 AM
  6. Finding a closest match with more than one criteria
    By Jayana in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 08-15-2011, 06:45 PM
  7. closest match from multiple criteria
    By wongja in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 07-31-2010, 01:37 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