+ Reply to Thread
Results 1 to 12 of 12

Find The Slope of Three Points

  1. #1
    Forum Contributor
    Join Date
    10-05-2010
    Location
    CA
    MS-Off Ver
    Excel 365
    Posts
    539

    Question Find The Slope of Three Points


    SEE POST #9


    Hello,
    I need help with creating a formula that finds the slop (incline, gradient, angle) of three points. No sure how to phrase it. I’m not sure how to calculate this mathematically and hoped it could be done in Excel. What I most concerned with is the slop of point (C) compared to the other two points, with point (B) being the vertex.

    I’m not sure if I’m explaining what I need well enough, so feel free to ask questions. The attached spreadsheet has the values and the order they are in.


    Thank you in advance for any and all help.
    Attached Files Attached Files
    Last edited by artiststevens; 01-30-2016 at 05:12 PM.

  2. #2
    Forum Expert shukla.ankur281190's Avatar
    Join Date
    05-17-2014
    Location
    Lucknow, India
    MS-Off Ver
    Office 365
    Posts
    3,937

    Re: Find The Slope of Three Points

    What is your expected result in I columns??? can you please explain it more??
    If I helped, Don't forget to add reputation (click on the little star ★ at bottom of this post)
    Don't forget to mark threads as "Solved" (Thread Tools->Mark thread as Solved)

  3. #3
    Forum Expert José Augusto's Avatar
    Join Date
    10-29-2014
    Location
    Portugal
    MS-Off Ver
    2013-2016
    Posts
    3,329

    Re: Find The Slope of Three Points

    Hi
    A point in 2D is a pair of values (x, y) not a number. In 3d is (x, y ,z). Can you explain this better?

  4. #4
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Find The Slope of Three Points

    As Jose has said we need to know the x,y co-ordinates of the points.

    The general slope formula is y1-y2/x1-x2

    You are telling us what the X values are but we don't know the Y values. Do we assume that A, B & C are 1 unit apart? i.e. what's the y value of each point. Assuming they are 1 unit apart then

    Slope AB would be -1/1 = -1 i.e. (1-2)/(6-5)
    Slope CB would be 1/2 = 0.5 i.e. (3-2)/(5-3)
    Richard Buttrey

    RIP - d. 06/10/2022

    If any of the responses have helped then please consider rating them by clicking the small star icon below the post.

  5. #5
    Forum Expert José Augusto's Avatar
    Join Date
    10-29-2014
    Location
    Portugal
    MS-Off Ver
    2013-2016
    Posts
    3,329

    Re: Find The Slope of Three Points

    Hi artiststevens

    The values of [Point A] and the values of [Point C] are correlated.
    To get the slope of the regression line use the following formula which gives you the value 1,002898049
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    To get the intercept of the regression line use the following formula which gives you the value -0,002377799
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    To get the correlation coeficient of the regression line use the following formula which gives you the value 0,999943945 (one is 100%)
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    Is this you want?

  6. #6
    Forum Contributor
    Join Date
    10-05-2010
    Location
    CA
    MS-Off Ver
    Excel 365
    Posts
    539

    Question Re: Find The Slope of Three Points

    Hello Everyone,
    Sorry for the late reply. Thank you everybody for your input and attempting to help me find a solution. After reading the post I’m going to try to better clarify what I need. I know that two numbers are required on both axis two on the X and two on the Y but I only have the single values. What Richard stated though is correct that each value is 1 unit apart. I attempted to use the formulas provided but the result appears a little wonky.

    I’m attaching a new file with the formula entered along with examples of different angles in one instance plotted on a grid and the other solely examples of different angles. Point B serves as the vertex with the most important angle being “C”.

    Please see attached files for a better explanation.

    Thank you very much for attempting to assist me with my problem. I figured it would be difficult to understand but I'll try to explain it better.

    Thanking you in advance again for any and all help.
    Attached Files Attached Files

  7. #7
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Find The Slope of Three Points

    The slope calculations are correct.

    The reason the numbers don't look right is because the decimal numbers are very small so that even a tiny change makes a big difference. Take F16:G16. Although these appear to be the same value the difference is in fact 0.0000177667. The P12:Q12 difference for the y axis is .0001

    Hence .0001 divided by .000017.. results in 5.63

    With F17:G17 the difference is .0000769 which is over 4 times the F16:G16 difference.

  8. #8
    Forum Expert José Augusto's Avatar
    Join Date
    10-29-2014
    Location
    Portugal
    MS-Off Ver
    2013-2016
    Posts
    3,329

    Re: Find The Slope of Three Points

    Hi
    Try to use the following
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    Is the tangent of the angle ABC

    The file slope2(2).xlsm include a macro to show the 'vertex'

    Regards

  9. #9
    Forum Contributor
    Join Date
    10-05-2010
    Location
    CA
    MS-Off Ver
    Excel 365
    Posts
    539

    Question Re: Find The Slope of Three Points

    Hello,
    I first wanted to say thank you very much Richard and Jose for the help, it is greatly appreciated. Thank you Richard for explaining the reasons why the results don’t look right. I see now how such small changes can make a big difference.

    A huge thank you to you Jose. I really appreciate you creating a formula and a macro to show the vertex, that’s above and beyond what I was expecting. I’ve been reviewing the file and everything looks great but I have a few more questions.

    Also, I’ve included another spreadsheet with new point values along with the actual corresponding images to each point, so you can visually see the slope/angle of the line. On the new spreadsheet is an image of a circle which is intending to give a visual breakdown of what I’m looking for as well. Everything above the vertex of (B) would be consider positive and everything below it would be considered negative. Hopefully that explains it better.

    Questions
    1. The most important point is C and my desire is to see how strong the angle/slope of C is in conjunction with the other two points, whether the slope is positive or negative. There are six variations of angles and my goal is to find the ideal angle/slope for each.

    Is there a way I formulaically determine the variation or maybe a better way to express the slop/angle to different each one?

    2. When the values of any of the points is equal the result is #DIV/0!?

    3. I’ve added new points and moved things around and now the “vertex” macro isn’t working any longer. How can I fix that?


    Thank you very much again both of you for all of the help and any further help you could provide. Also, if I’m asking too much and need to post this in commercial services please let me know. Thank you again.
    Attached Images Attached Images
    Attached Files Attached Files

  10. #10
    Forum Expert José Augusto's Avatar
    Join Date
    10-29-2014
    Location
    Portugal
    MS-Off Ver
    2013-2016
    Posts
    3,329

    Re: Find The Slope of Three Points

    Hi
    1. See if the values of M column (angle oriented ABC) helps you
    2. y = mx (reduced equation of a line) can not represent vertical lines. Thus, in case of error, you should opt for a large slope value (eg +/-999). See columns F and G. (on error, I considere Slope AB as negative and slope BC as positive)
    3. The graphical representation is a visual help and is already corrected. You can see in the chart data that the series defining the semi-straight boundary are cleared. If marked you can use the value of P1 cell to modify these limits. I put my transparent graphic over the image.
    See the file slope2(4).xlsm.
    Regards.
    Last edited by José Augusto; 01-25-2016 at 02:26 PM.

  11. #11
    Forum Contributor
    Join Date
    10-05-2010
    Location
    CA
    MS-Off Ver
    Excel 365
    Posts
    539

    Re: Find The Slope of Three Points

    Sorry for the late reply. Had the opportunity to review the file Jose and I wanted to say thank you very much for the help. It is greatly appreciated that you took the time to do this for me. Above and beyond what I was expecting. Thank you very much.

  12. #12
    Forum Expert José Augusto's Avatar
    Join Date
    10-29-2014
    Location
    Portugal
    MS-Off Ver
    2013-2016
    Posts
    3,329

    Re: Find The Slope of Three Points

    Hi Stevens
    My pleasure and many thanks for reputation.

+ 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. Visual Basic Help to find the slope of a line
    By magnerirish in forum Excel Programming / VBA / Macros
    Replies: 16
    Last Post: 12-03-2015, 03:39 AM
  2. Replies: 3
    Last Post: 01-23-2014, 03:19 PM
  3. Calculating Slope and Intercept with a changing number of data points
    By WE5T in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 09-10-2013, 05:48 AM
  4. slope of a set of points
    By jcody in forum Excel General
    Replies: 3
    Last Post: 09-20-2012, 10:10 AM
  5. Unable to Find the slope together with Vlookup
    By oseroser in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 09-10-2012, 01:36 PM
  6. Find (x,y) coordinate, given target Slope
    By scope951 in forum Excel Charting & Pivots
    Replies: 0
    Last Post: 06-03-2010, 03:43 PM
  7. how do I find the slope of a graph?
    By El - Raj in forum Excel General
    Replies: 2
    Last Post: 01-22-2006, 10:55 PM

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