simple IF statement help

jjmcnace

New Member
Joined
Jan 25, 2004
Messages
5
I am pretty new to excel. Here is my problem. I use this IF statement in my spreadsheet.

=IF((Y11-Y9)>0,"(90*PI/180)-ARCTAN((Z11-Z9)/Y11-Y9))","(270*PI/180)-ARCTAN((Z11-Z9)/Y11-Y9))")


I want the calculated number to show up, instead of the (90*PI/180)-ARCTAN((Z11-Z9)/Y11-Y9)) to show up.

What can I do to get this to work?
 

Excel Facts

Select all contiguous cells
Pressing Ctrl+* (asterisk) will select the "current region" - all contiguous cells in all directions.
=IF((Y11-Y9)>0,(90*PI/180)-ARCTAN((Z11-Z9)/Y11-Y9)),(270*PI/180)-ARCTAN((Z11-Z9)/Y11-Y9)))
 
Upvote 0
the quotes is something that excel puts in itself. the actual phrase(90*PI/180)-ARCTAN((Z11-Z9)/Y11-Y9)) shows up instead of calculating the answer to the phrase.
 
Upvote 0
jjmcnace said:
the quotes is something that excel puts in itself. the actual phrase(90*PI/180)-ARCTAN((Z11-Z9)/Y11-Y9)) shows up instead of calculating the answer to the phrase.

That's because the quotes are there.

(Is ARCTAN a native XL function?)
 
Upvote 0
So if ATAN is the function, why are you using ARCTAN? And is ARCTAN an XL function...I couldn't find it.
 
Upvote 0
i'm using ATAN, this is what shows up in the formula bar. I'm not putting the " in the formula excel is doing this.

=IF((Y11-Y9)>0,"(90*PI/180)-ATAN((Z11-Z9)/Y11-Y9))","(270*PI/180)-ATAN((Z11-Z9)/Y11-Y9))")

For example in the cell I'm trying to program Y11-Y9>0 is a true statement, so I want the answer to the formula (90*PI/180)-ATAN((Z11-Z9)/Y11-Y9)) appied to the cell, not the text of the formula itself to show up.

How can I keep excel from inserting the " or is this even the problem.
 
Upvote 0
jjmcnace said:
i'm using ATAN, this is what shows up in the formula bar. I'm not putting the " in the formula excel is doing this.

=IF((Y11-Y9)>0,"(90*PI/180)-ATAN((Z11-Z9)/Y11-Y9))","(270*PI/180)-ATAN((Z11-Z9)/Y11-Y9))")

For example in the cell I'm trying to program Y11-Y9>0 is a true statement, so I want the answer to the formula (90*PI/180)-ATAN((Z11-Z9)/Y11-Y9)) appied to the cell, not the text of the formula itself to show up.

How can I keep excel from inserting the " or is this even the problem.

Your syntax for the PI function is not correct.

Have a look at XL Help.
It should be PI() instead of PI
 
Upvote 0
"Your syntax for the PI function is not correct."

...& cos it's not correct, excel assumes you're trying to enter a text string ('cos it can't be a formula - it's not syntactically correct), hence the quotes...
 
Upvote 0

Forum statistics

Threads
1,214,432
Messages
6,119,468
Members
448,900
Latest member
Fairooza

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