Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
TOMSQUAD
 
Posts: n/a
Default 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   Report Post  
Jason Morin
 
Posts: n/a
Default

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   Report Post  
TOMSQUAD
 
Posts: n/a
Default

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   Report Post  
Dana DeLouis
 
Posts: n/a
Default

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
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 call a function from another workbook Joe Excel Discussion (Misc queries) 4 November 26th 04 03:49 PM
Re-assigning weekend days in "Networkdays" Function sts75 Excel Discussion (Misc queries) 0 November 26th 04 10:45 AM


All times are GMT +1. The time now is 12:50 AM.

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

About Us

"It's about Microsoft Excel"