Home |
Search |
Today's Posts |
#1
|
|||
|
|||
Solving for X and Y with a = in the FUNCTION???
If you have a triangle with the following points
A (-6,-4) B (-1,8) C (13,-2) Find the point perpendicular to AC. y-y1=m(x-x1) For this equation, it is solved y+4=2/19(x+6) y=2/19x-64/19 y-8=-19/2(x+1) y=-19/2x-3/2 Therefo 2/19x-64/19=-19/2x-3/2 365x=71 x=.195 ..195 is substituted back into the orginal formula to find for y. I know to use the x and y variable to have the function call out a cell with either the x or y in that cell, what I believe is screwing up the function is the = sign in the middle of it. Any suggestions? |
#2
|
|||
|
|||
Here's one way you can solve it in Excel:
http://tinyurl.com/45kpx HTH Jason Atlanta, GA -----Original Message----- If you have a triangle with the following points A (-6,-4) B (-1,8) C (13,-2) Find the point perpendicular to AC. y-y1=m(x-x1) For this equation, it is solved y+4=2/19(x+6) y=2/19x-64/19 y-8=-19/2(x+1) y=-19/2x-3/2 Therefo 2/19x-64/19=-19/2x-3/2 365x=71 x=.195 ..195 is substituted back into the orginal formula to find for y. I know to use the x and y variable to have the function call out a cell with either the x or y in that cell, what I believe is screwing up the function is the = sign in the middle of it. Any suggestions? . |
#3
|
|||
|
|||
Thanks for the advice, this isn't quite what I was looking for, it didn't
work in my case, and I am still stuck. I think it is possibly the = sign in the equation that excel isn't reading. Or maybe it is the variables. "Jason Morin" wrote: Here's one way you can solve it in Excel: http://tinyurl.com/45kpx HTH Jason Atlanta, GA -----Original Message----- If you have a triangle with the following points A (-6,-4) B (-1,8) C (13,-2) Find the point perpendicular to AC. y-y1=m(x-x1) For this equation, it is solved y+4=2/19(x+6) y=2/19x-64/19 y-8=-19/2(x+1) y=-19/2x-3/2 Therefo 2/19x-64/19=-19/2x-3/2 365x=71 x=.195 ..195 is substituted back into the orginal formula to find for y. I know to use the x and y variable to have the function call out a cell with either the x or y in that cell, what I believe is screwing up the function is the = sign in the middle of it. Any suggestions? . |
#4
|
|||
|
|||
I'm not sure if this is totally correct, but see if this would work. I've
done this using x,y pairs, with the perpendicular point given last (ie B (-1,8)). There may be a more efficient equation. Sub Testit() Dim v v = PerpPoint(-6, -4, 13, -2, -1, 8) Range("A1:B1") = v 'or Debug.Print "x: "; v(0) Debug.Print "y: "; v(1) End Sub Function PerpPoint(a, b, c, d, e, f) As Variant Dim x As Double Dim y As Double Dim t As Double x = (b^2*c+a^2*e+a*b*(f-d)-b*c*(d+f)+a*(d^2-2*c*e-d*f)+c*(c*e+d*f)) y = ((a-c)*(d*(a-e)+b*(e-c))+(b-d)^2*f) t = (a-c)^2+(b-d)^2 PerpPoint = Array(x / t, y / t) End Function Returns: x: 0.194520547945205 y: -3.34794520547945 HTH :) -- Dana DeLouis Win XP & Office 2003 "TOMSQUAD" wrote in message ... Thanks for the advice, this isn't quite what I was looking for, it didn't work in my case, and I am still stuck. I think it is possibly the = sign in the equation that excel isn't reading. Or maybe it is the variables. "Jason Morin" wrote: Here's one way you can solve it in Excel: http://tinyurl.com/45kpx HTH Jason Atlanta, GA -----Original Message----- If you have a triangle with the following points A (-6,-4) B (-1,8) C (13,-2) Find the point perpendicular to AC. y-y1=m(x-x1) For this equation, it is solved y+4=2/19(x+6) y=2/19x-64/19 y-8=-19/2(x+1) y=-19/2x-3/2 Therefo 2/19x-64/19=-19/2x-3/2 365x=71 x=.195 ..195 is substituted back into the orginal formula to find for y. I know to use the x and y variable to have the function call out a cell with either the x or y in that cell, what I believe is screwing up the function is the = sign in the middle of it. Any suggestions? . |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
How to call a function from another workbook | Excel Discussion (Misc queries) | |||
Re-assigning weekend days in "Networkdays" Function | Excel Discussion (Misc queries) |