![]() |
IF statement problem with IMAGINARY
Hi: I have a cell, B31, that contains an imaginary number (69.2 +
39.4i). I want to do the following using the IF function (psuedo code below): IF IMREAL(B31) = 0 TRUE Then evaluate to "ATAN(IMAGINARY(B31) / 0.0000001" FALSE Then evaluate to "ATAN(IMAGINARY(B31)/IMREAL(B31))" The TRUE part works properly and evaluates to a number. The FALSE part doesn't work and just puts the text "ATAN(IMAGINARY(B31)/IMREAL(B31))" in the cell. What am I doing wrong? thanks, russ |
IF statement problem with IMAGINARY
What is the full code of the equation?
"Russ" wrote: Hi: I have a cell, B31, that contains an imaginary number (69.2 + 39.4i). I want to do the following using the IF function (psuedo code below): IF IMREAL(B31) = 0 TRUE Then evaluate to "ATAN(IMAGINARY(B31) / 0.0000001" FALSE Then evaluate to "ATAN(IMAGINARY(B31)/IMREAL(B31))" The TRUE part works properly and evaluates to a number. The FALSE part doesn't work and just puts the text "ATAN(IMAGINARY(B31)/IMREAL(B31))" in the cell. What am I doing wrong? thanks, russ |
IF statement problem with IMAGINARY
=IF(IMREAL(B31)=0,ATAN(IMAGINARY(B31)/0.000001),"ATAN(IMAGINARY(B31)/IMREAL(B31))")
|
IF statement problem with IMAGINARY
get rid of the quotes the equation thinks you want text.
=IF(IMREAL(B31)=0,ATAN(IMAGINARY(B31)/0.000001),ATAN(IMAGINARY(B31)/IMREAL(B31))) "Russ" wrote: =IF(IMREAL(B31)=0,ATAN(IMAGINARY(B31)/0.000001),"ATAN(IMAGINARY(B31)/IMREAL(B31))") |
IF statement problem with IMAGINARY
Here is the solution. When I use the function wizard to enter the
equation the result is this: =IF(IMREAL(B31)=0,ATAN(IMAGINARY(B31)/0.000001),"ATAN(IMAGINARY(B31)/IMREAL(*B31)))" When I take out the quotes like bj suggested (by directly editing the cell formula) it works. Looks like a bug in the function wizard. Agree? thanks, russ |
All times are GMT +1. The time now is 03:44 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com