Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 4
Default 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

  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
bj bj is offline
external usenet poster
 
Posts: 1,397
Default 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


  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 4
Default IF statement problem with IMAGINARY

=IF(IMREAL(B31)=0,ATAN(IMAGINARY(B31)/0.000001),"ATAN(IMAGINARY(B31)/IMREAL(B31))")

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
bj bj is offline
external usenet poster
 
Posts: 1,397
Default 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))")


  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 4
Default 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

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
I'm having a really strange problem with 3 if statements. Marc Excel Worksheet Functions 4 April 5th 06 02:36 PM
If Statement linked to cell with VLOOKUP problem - getting wrong v Mike R. Excel Worksheet Functions 4 January 14th 06 02:16 PM
Fundamental problem with IF statement David F Excel Worksheet Functions 4 May 12th 05 09:34 PM
Formula Problem - If Statement Margie Excel Worksheet Functions 4 April 29th 05 10:07 PM
Excel Display Problem Bill Martin -- (Remove NOSPAM from address) Excel Discussion (Misc queries) 0 April 19th 05 05:25 PM


All times are GMT +1. The time now is 08:01 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"