M
Me
For both Excel 2000 & 97.
I have the VBA function below: (Degrees to Radians)
Function DR(D)
DR = 3.14159265358979 * D / 180#
End Function
Inside of Excel (cell N4) I have the function:
=-_A^2-_B^2-2*_A*_C*TAN(DR(E4))^2/COS(DR(E4))+3*_B*_C*TAN(DR(E4))/COS(DR(E4))+_A*_C/COS(DR(E4))
Inside of Excel (cell O4) I have the function:
=-2*_A*_C*TAN(DR(E4))^2/COS(DR(E4))+3*_B*_C*TAN(DR(E4))/COS(DR(E4))+_A*_C/COS(DR(E4))-_A^2-_B^2
The only difference being the placement of the -_A^2-_B^2 terms. In
N4, the placement is at the beginning; whereas, in O4, the placement
is at the end. I would think (obviously I'm wrong) that they would
evaluate the same. Cell O4 gives the correct answer.
The three named cells are:
_A in cell B8 value = 24
_B in cell B9 value = 25
_C in cell B10 vallue = 40.23
Cell E4 has a value of 0.4.
Also, if I put a + in front of the -_A^2-_B^2 term in cell O4 like
this:
=-2*_A*_C*TAN(DR(E4))^2/COS(DR(E4))+3*_B*_C*TAN(DR(E4))/COS(DR(E4))+_A*_C/COS(DR(E4))+-_A^2-_B^2
The expression evaluates incorrectly with the same value as in cell
N4.
Can anyone help me by telling me which rule I'm breaking? I've been
trying to figure out this black box and I'm stuck. Thanks in advance
for any help.
I have the VBA function below: (Degrees to Radians)
Function DR(D)
DR = 3.14159265358979 * D / 180#
End Function
Inside of Excel (cell N4) I have the function:
=-_A^2-_B^2-2*_A*_C*TAN(DR(E4))^2/COS(DR(E4))+3*_B*_C*TAN(DR(E4))/COS(DR(E4))+_A*_C/COS(DR(E4))
Inside of Excel (cell O4) I have the function:
=-2*_A*_C*TAN(DR(E4))^2/COS(DR(E4))+3*_B*_C*TAN(DR(E4))/COS(DR(E4))+_A*_C/COS(DR(E4))-_A^2-_B^2
The only difference being the placement of the -_A^2-_B^2 terms. In
N4, the placement is at the beginning; whereas, in O4, the placement
is at the end. I would think (obviously I'm wrong) that they would
evaluate the same. Cell O4 gives the correct answer.
The three named cells are:
_A in cell B8 value = 24
_B in cell B9 value = 25
_C in cell B10 vallue = 40.23
Cell E4 has a value of 0.4.
Also, if I put a + in front of the -_A^2-_B^2 term in cell O4 like
this:
=-2*_A*_C*TAN(DR(E4))^2/COS(DR(E4))+3*_B*_C*TAN(DR(E4))/COS(DR(E4))+_A*_C/COS(DR(E4))+-_A^2-_B^2
The expression evaluates incorrectly with the same value as in cell
N4.
Can anyone help me by telling me which rule I'm breaking? I've been
trying to figure out this black box and I'm stuck. Thanks in advance
for any help.