# 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

Format cells as currency
Select range and press Ctrl+Shift+4 to format cells as currency. (Shift 4 is the \$ sign).
L

Omit the quotes.

#### Zack Barresse

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

#### jjmcnace

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

L

#### Legacy 21301

##### Guest

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

#### jjmcnace

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

#### Todd Bardoni

##### Well-known Member

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

#### jjmcnace

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

L

#### Legacy 21301

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

##### MrExcel MVP
"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... Excel contains over 450 functions, with more added every year. That’s a huge number, so where should you start? Right here with this bundle.

### Forum statistics

1,167,817
Messages
5,855,806
Members
431,765
Latest member
RedleoUK ### 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