Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
=COMPLEX(COS(C9),SIN(C9)) returns 0.564642473395035+0.564642473395035i and we
want 0.56+0.56i |
#2
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Hi
See if the article at http://support.microsoft.com/?scid=k...51338&x=11&y=6 does what you want. Regards, Pedro J. =COMPLEX(COS(C9),SIN(C9)) returns 0.564642473395035+0.564642473395035i and we want 0.56+0.56i |
#3
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Hi. Just a comment. The Microsoft article appears to assume a complex number ends in "i"
Note that it could end in "j" =COMPLEX(3,4,"j") Another idea for the code might be to use "ImReal" and "Imaginary" as in this idea: Sub Demo() Dim s s = "-3-4j" With WorksheetFunction Debug.Print .ImReal(s) Debug.Print .Imaginary(s) End With End Sub -- HTH :) Dana DeLouis "Infinitogool" wrote in message ... Hi See if the article at http://support.microsoft.com/?scid=k...51338&x=11&y=6 does what you want. Regards, Pedro J. =COMPLEX(COS(C9),SIN(C9)) returns 0.564642473395035+0.564642473395035i and we want 0.56+0.56i |
#4
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
I'm interested as to what value of C9 gives you that result? I would have
expected COS(C9) and SIN(C9) to have the same +ve value only for C9=RADIANS(45) [and multiples of 2*PI() beyond that], and in that case the values would be SQRT(2), not 0.564642473395035 But to answer your formatting question, perhaps =COMPLEX(ROUND(COS(C9),2),ROUND(SIN(C9),2)) -- David Biddulph "abbyjaz" wrote in message ... =COMPLEX(COS(C9),SIN(C9)) returns 0.564642473395035+0.564642473395035i and we want 0.56+0.56i |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Why do my numbers keep going down decimal places? | Setting up and Configuration of Excel | |||
Why do my numbers keep going down decimal places? | Setting up and Configuration of Excel | |||
How to change complex 0.122345687+0.87659454j to 3 decimal places | Excel Discussion (Misc queries) | |||
Sum of numbers with only two decimal places wrong | Excel Discussion (Misc queries) | |||
Subtracting two 2-decimal place numbers gives result 13-decimal places? | Excel Worksheet Functions |