# simple IF statement help

#### jjmcnace

##### New Member
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

Waterfall charts in Excel?
Office 365 customers have access to Waterfall charts since late 2016. They were added to Excel 2019.
Omit the quotes.

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

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.

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?)

ATAN is an XL function, it means arctan which as a trignometric funtion

So if ATAN is the function, why are you using ARCTAN? And is ARCTAN an XL function...I couldn't find it.

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.

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

"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...

Replies
3
Views
98
Replies
3
Views
238
Replies
3
Views
2K
Replies
1
Views
192
Replies
12
Views
488

1,211,697
Messages
6,103,360
Members
447,861
Latest member
LllopezXC

### 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.

### Which adblocker are you using?

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

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