[英]How to calculate the angle of 2 lines in excel
For each Value displayed in an excel 'line chart', I want to calculate in excel the degrees between对于 excel “折线图”中显示的每个值,我想计算 excel 之间的度数
Pt (x)铂(x) | Value (y)值(y) |
---|---|
1 1个 | 5 5个 |
2 2个 | 15 15 |
3 3个 | 40 40 |
Sample display in this link with the degrees desired represented by the purple arrows此链接中的示例显示,紫色箭头表示所需的度数
I have tried DEGREES ATAN SLOPE but not doing something correctly我已经尝试过 DEGREES ATAN SLOPE 但没有做正确的事情
Does anyone know the formula for this in excel?有谁知道 excel 中的这个公式吗?
I believe this is a good candidate for your formula:我相信这是您的公式的一个很好的候选者:
=DEGREES(PI()/2 - ATAN(SLOPE(B2:B3,A2:A3)))
Hereby a screenshot:特此截图:
Be aware that both X- and Y-scales should be equal or very similar in order to get good results: in your drawing, the distance between 1 and 2 on the X-axis is far larger than the distance between 0 and 5 on the Y-axis, giving a completely wrong impression for the angle.请注意,X 轴和 Y 轴的比例应该相等或非常相似才能获得良好的结果:在您的绘图中,X 轴上 1 和 2 之间的距离远大于 X 轴上 0 和 5 之间的距离Y 轴,给人以完全错误的角度印象。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.