LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 32
Default Excel VBA locate nearest point

HI everyone

I hav sent a post earlier [match numerical data using excel vba] , wel
after posting that i thot abt it more n sipplified this
way ............

I have x,y coordinates of say 1000 points [no. of points vary ] (data
set 1) n also dataset2 of around 2500 points ....

now i want to locate the nearest coordinate using formula

d = ((x2-x1)^2+(y2-y1)^2) should be minimum , but i m unable to
program it correctly

say for example here are two data sets
dataset1 a1:b9 dataset2 e1:f9
data set 1 dataset 2

1 9 9 1
2 8 8 2
3 7 7 3
4 6 6 4
5 5 5 5
6 4 4 6
7 3 3 7
8 2 2 8
9 1 1 9

dataset above is not actual , its just an example
now wat i want to do it to first of chk cell(1,1) and cell(1,2)
values [dataset1] and find distance using coordinates of dataset and
where evr it find minimum distane "d" [ in above xaple its cell(9 ,
5 ) n cell(9,6 )]
copy the cooresponding coordinates n front of dataset1
values that is in cell(1,3) and cell(1,4)

i hope i hav made my problem clear, for further xplaination plz let me
knw

Many thanks for any or all suggestions

 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
how to locate a point on excel graph? logetic Charts and Charting in Excel 6 April 26th 23 03:45 AM
How do i locate the point of intersection of two lines graphs Nana Adwoa Charts and Charting in Excel 4 April 2nd 23 07:58 PM
Data point on line is not over the point/tick in X axis... TomCat Charts and Charting in Excel 2 September 6th 07 01:36 PM
Rounding to the nearest quarter point? George Excel Discussion (Misc queries) 3 June 10th 06 10:12 PM
Find the nearest point to 1000 rows where "amounts" balance and apply special formatting to that row Paul Excel Programming 4 October 14th 05 05:02 PM


All times are GMT +1. The time now is 08:19 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"