Can trig functions be used inside an IF function?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-25-2021
05:38 AM
- I'm creating an IF function and I have several others that I know work - such as if(b+c<a,0,if(a+b<c,0,if(a+c<b,0,1))) can be used to determine if 3 given numbers create a triangle - so I know my general process is correct.
- My new formula determines the angle measure in a triangle plus an original bearing angle and I've verified that it works: (acos((((((a*h)^2+(b*h)^2-(2*(a*h)*(b*h)*cos(deg_to_rad(x+y))))^.5)^2+(b*h)^2-(a*h)^2)/(2*b*h*(((a*h)^2+(b*h)^2-(2*(a*h)*(b*h)*cos(deg_to_rad(x+y))))^.5))))*(180/pi))+b
- The problem occurs when I try to put this new formula INTO the IF function.
- For example, let's call the crazy formula above X. I want the IF function to be if(X>90,1,2) but I get an "invalid formula" error when I insert the crazy formula in for X. It doesn't seem to matter if I put parenthesis around it or not.
- Is the problem the trig function inside the IF function or am I doing something else wrong?
This discussion post is outdated and has been archived. Please use the Community question forums and official documentation for the most current and accurate information.