# 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

Spell Check in Excel
Press F7 to start spell check in Excel. Be careful, by default, Excel does not check Capitalized Werds (whoops)
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...

Replies
1
Views
522
Replies
4
Views
890
Replies
14
Views
233
Replies
7
Views
137
Replies
4
Views
333

1,171,565
Messages
5,876,216
Members
433,185
Latest member
ptr009

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