Intercept of two lines in excel chart

Lana

New Member
Joined
Aug 8, 2002
Messages
2
Does anybody know how to find the exact value of the intercept of two lines in excel chart. I can find the aprox. value but i need an exact one. I use office 97 ( i work for a not very technologically advanced company)...

I would appreciate any help.
 

Excel Facts

How to change case of text in Excel?
Use =UPPER() for upper case, =LOWER() for lower case, and =PROPER() for proper case. PROPER won't capitalize second c in Mccartney
<style>td{ font-size: 10pt}p{ font-size: 10pt}pre{font-size:10pt;color:blue;font-family:Arial}</style>
Do you know the equations of the two lines?

If not, I assume you have a bunch of data points, and the question becomes how are you creating the lines? (a) with a trendline, (b) with XL's charting module connecting the dots, (c) with (b) and smoothing turned on.

_________________
Regards,

Tushar
www.tushar-mehta.com
This message was edited by tusharm on 2002-08-09 12:30
This message was edited by tusharm on 2002-08-09 12:30
 
Upvote 0
I am using the chart wizard. Yes, i do have the data points that are connected into one line... any ideas?
 
Upvote 0
OK, courtesy of some code I wrote some time ago, this task is not too difficult. However, do bear in mind that the user interface is not fool-proof. So, even coming from a technologically-challenged company you will have to do some work. Though, this is a non-programmatic solution so you don't have to write VBA code. Does that help?

Note that the x-values for both data sets have to be in ascending order.

Name (Insert | Name > Define..) the x-values of your first data set x1Vals. Name the y-values y1Vals. Similarly, name the x- and y-values of your 2nd data set x2Vals and y2Vals, respectively.

In the Visual Basic Editor...oh, no! Wait, we are using a non-programmatic solution. Scratch that.

Plot the two series so that you have an approximate idea of the x-values where the two intersect.

In some cell, enter that approx. value. Name that cell CommonXVal.

{Instead of typing the formulas below you may be better off with copy-paste steps}

In two adjacent cells, say, J8 and K8, enter the formulas
<pre>=MATCH(commonXVal,x1vals,1)</pre>
and
<pre>=MATCH(commonXVal,x2vals,1)</pre>
In the two cells just below these (i.e., J9 and K9), enter the formulas
<pre>=(INDEX(y1vals,J8+1)-INDEX(y1vals,J8))/(INDEX(x1vals,J8+1)-INDEX(x1vals,J8))*(commonXVal-INDEX(x1vals,J8))+INDEX(y1vals,J8)</pre>
and
<pre>=(INDEX(y2vals,K8+1)-INDEX(y2vals,K8))/(INDEX(x2vals,K8+1)-INDEX(x2vals,K8))*(commonXVal-INDEX(x2vals,K8))+INDEX(y2vals,K8)</pre>
If you didn't use J8 and K8 as in the example above, you will have to adjust the J8 and K8 references in the big messy formulas to refer to the cells you did use.

In K10, enter the formula <pre>=J9-K9</pre>Again, if you didn't use J9 and K9 for the formulas as in the example above, you will have to adjust the formula accordingly.

Now, run Goal Seek (though, personally, I prefer the more sophisticated Solver) by selecting Tools | Goal Seek... Set the 'Set Cell' to K10, the 'To Value' to 0 (that's zero), and the 'By changing cell' to CommonXVal.

Click OK and you should have the exact result.
 
Upvote 0
The worksheet, courtesy HTMLMaker:
test_linear_interp-lana.xls
BCDEFGHIJK
2x1valuesy1valuesx2valuesy2valuesx12.50632
3-28.345-9.7821-18.85922.095286
4-17.89-5.6667-9.26249-5.5094
50.92322.89110.489764.272487
61.2122.997811.323879.759326
74.55213.6711.4470323.39714
810.7525.00315.0811331.408865
930.833.3339.9089543.4639325.7324225.73242
100
11Namesinsheet
12commonXVal=Sheet1!$K$2
13x1vals=Sheet1!$B$3:$B$9
14x2vals=Sheet1!$G$3:$G$9
15y1vals=Sheet1!$C$3:$C$9
16y2vals=Sheet1!$H$3:$H$9
Sheet1
 
Upvote 0
I realise this post is several years old, but it is just what I need.

Is there any chance somebody could explain what the formulas above actually do? I am looking to do the same thing, but end up with the Y value of the intercept, not the X.

Thanks
 
Upvote 0

Forum statistics

Threads
1,214,621
Messages
6,120,568
Members
448,972
Latest member
Shantanu2024

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