45 degree line in a graph

feaner

New Member
Joined
Mar 2, 2009
Messages
2
How do i put a 45 degree line in a graph? Then how would I go about finding the intersection of that line and a trendline? Any help would be greatly appreciated :)
 

Excel Facts

Format cells as currency
Select range and press Ctrl+Shift+4 to format cells as currency. (Shift 4 is the $ sign).
I assume that by 45 degree line, you mean a line with a slope of 1 that passes through 0, 0?

If so, you can make another data series and plot that.

1, 1
2, 2
3, 3

That will give you a picture of that line.

The other part of the problem is not as direct. Basically, you will have to set equation of one line, equal to the other to find the X intersect.

So, if you have the following

f(x) = x (this is your reference line)

and

g(x) = mx + b

Then your x intersect would be

x = b/(1-m)

Translated to an Excel Formula, that would be something like:

=INTERCEPT(F19:F23,E19:E23)/(1-SLOPE(F19:F23,E19:E23))

Where Column F has your Y values, and column E has your X values.

So to get your Y value for the intersect, you would use something like

=SLOPE(F19:F23,E19:E23)*INTERCEPT(F19:F23,E19:E23)/(1-SLOPE(F19:F23,E19:E23))+INTERCEPT(F19:F23,E19:E23)

.....

I think....
 
Upvote 0
I actually just realized it is a "bit" simpler.

Since your first function is f(x) = x, the x point and y point will always be equal.

So you really only need to solve for the x intersect. No reason to plug it in and get y. However... my solution would be useful if you had two different lines of any given slope.

:)
 
Upvote 0
I used another method, copied the x data again then used trend line. The created points can be colored with no fill. You can simply adjust the trend line to fit the plot.
 
Upvote 0

Forum statistics

Threads
1,225,197
Messages
6,183,500
Members
453,165
Latest member
kuldeep08126

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top