

Excel VBA Discuss using VBA for Excel programming. 
Welcome to the p2p.wrox.com Forums.
You are currently viewing the Excel VBA section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developersâ€™ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .





November 17th, 2006, 08:13 PM

Registered User


Join Date: Nov 2006
Location: jersey city, NJ, USA.
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts


Will you please help me to solve this problem....?
Stevens Souter Breyer Ginsburg O'Conner Kennedy Roberts Scalia Alito Thomas
Stevens 1
Souter 0.72 1
Breyer 0.68 0.83 1
Ginsburg 0.69 0.64 0.64 1
O'Conner 0.57 0.86 0.71 0.57 1
Kennedy 0.38 0.5 0.43 0.53 0.57 1
Roberts 0.26 0.39 0.44 0.48 0.67 0.71 1
Scalia 0.3 0.36 0.41 0.39 0.71 0.65 0.88 1
Alito 0.13 0.36 0.35 0.41 0.87 0.91 0.78 1
Thomas 0.24 0.25 0.3 0.28 0.57 0.59 0.82 0.84 0.83 1
Hi guys, can you please help me to solve this gProblem.First of all paste this data to excel sheet. You have to determine the distance of each of the guy from the others., indirectly you have to determine the cartesian cooridnates in 2D of each of the guy. You can use any function, any algorithm. But you can't change the original data. If you have to changed ,then the error must be minimum.For Example ,For the person Souter, The distances is 0.72 for stevens, and 1 for himself. same way,For person Breyer, the distances are 0.68 for stevens.0.83 for Br,and 1 for himself.

November 22nd, 2006, 01:34 AM

Authorized User


Join Date: Nov 2006
Location: , , .
Posts: 29
Thanks: 0
Thanked 0 Times in 0 Posts


if youre not changing the data youre looking it up  store it in a table and query it  then you can use it to make calculations

November 22nd, 2006, 04:57 AM

Friend of Wrox


Join Date: Jun 2003
Location: London, , United Kingdom.
Posts: 173
Thanks: 0
Thanked 3 Times in 3 Posts


A couple of points:
1) This is not really an Excel VBA problem; its a mathematical puzzle.
2) There's a value missing for the distance between Alito and O'Conner. I'm guessing its part of the problem to fill in the blank.
3) I'm not sure I understand the problem; the table looks like a table of distances between people but you ask us to determine the distances between people as the solution to the problem. I'm assuming that what you really want solved is the Cartesian locations of each person given their distances interalia.
4) You refer obliquely to the fact that this is a 2D problem. This is very important to define the problem, it would appear that you have given us enough information to solve the problem in up to 5 dimensions.
5) I do not understand the relevance of the ones on the diagonal. Surely it is impossible for a person to be a distance away from himself other than 0. I assume you meant zeros on the diagonal or else nothing at all.
How to solve the problem:
1) Note that any translation of every element of the solution will still maintain the same intrapoint distances. Therefore, without loss of generality we may assume that Stevens is at (0,0)
2) Note that any rotation of the total solution around a point will still maintain the same intrapoint distances. Therefore, without loss of generality we may assume that Souter is at (0.72,0) {or (0.72,0), (0,0.72), (0,0.72), ...}
3) There remain eight people at unknown locations. Indicate the unknown locations algebraically as {(x1,y1),x2,y2),...,(x8,y8)}.
4) Given the 43 (remaining useful) interpoint distances supplied in the table you will now be able to set up 43 equations.
5) 43 equations in eight unknowns is just a simple extension of simultaneous equations with a super abundance of information.
6) Note that the super abundance of information relative to the dimensionality of the problem will means that unless the initial problem is well set out the table information will indicate that there is no 2D solution (although there may be a higher dimension solution)

Thread Tools 
Search this Thread 


Display Modes 
Linear Mode

Posting Rules

You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off




