The Student Room Group

Excel: Finding x values from y values using a trendline

Hi, so I have a scatter graph with a line of best fit or "trendline" as its called in excel and what I'm trying to do is create lines from specific y values across to the "trendline" and then down to the x axis to find the x value corresponding to the y value... Is this even possible? If it is please could someone with more knowledge than I let me know how to do it as soon as possible! Thanks in advance!
Reply 1
Choose to display the equation of the trendline and then do it with maths.
Reply 2
Original post by majikthise
Choose to display the equation of the trendline and then do it with maths.


Unfortunately I'm not that great at maths to be honest... The equation for the trendline is apparrently "y = 0.0312x + 0.0164" but that really dosent mean anything to me... :frown:

I've come to realise that a paper graph may have been easier... I'll keep trying to do it in excel for now but If I can't do it by tomorrow evening I'll have to just go for the old fashioned method lol
(edited 13 years ago)
Reply 3
I think he was telling you how to find values from x or y values.

AFAIK, there's no way Excel will draw them on for you. The best way is probably to play around with Autoshapes.
Reply 4
Original post by MALIK HAMID
Unfortunately I'm not that great at maths to be honest... The equation for the trendline is apparrently "y = 0.0312x + 0.0164" but that really dosent mean anything to me... :frown:

I've come to realise that a paper graph may have been easier... I'll keep trying to do it in excel for now but If I can't do it by tomorrow evening I'll have to just go for the old fashioned method lol


what that equation is saying is that for any given x value, you can calculate the y value by multiplying it by 0.0312 and adding 0.0164.

So if you want to know what y is when x is 10, just do 0.0312*10 + 0.0164

If you want to work out the x value for a given y instead, you just need to rearrange the equation to make x the subject, so for this it would be x = (y-0.0164)/0.0312


I don't know what your graph looks like, but from the equation you've given, it sounds like the line of best fit should probably go through the origin. There is an option in the format trendline window called 'set intercept' which you can change it so that it does.
Reply 5
Original post by alex-hs
what that equation is saying is that for any given x value, you can calculate the y value by multiplying it by 0.0312 and adding 0.0164.

So if you want to know what y is when x is 10, just do 0.0312*10 + 0.0164

If you want to work out the x value for a given y instead, you just need to rearrange the equation to make x the subject, so for this it would be x = (y-0.0164)/0.0312


I don't know what your graph looks like, but from the equation you've given, it sounds like the line of best fit should probably go through the origin. There is an option in the format trendline window called 'set intercept' which you can change it so that it does.


Thanks a lot this was really helpful!

Quick Reply