Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1
Default How do I modify the decimal places viewed in complex numbers

=COMPLEX(COS(C9),SIN(C9)) returns 0.564642473395035+0.564642473395035i and we
want 0.56+0.56i
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 52
Default How do I modify the decimal places viewed in complex numbers

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   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 947
Default How do I modify the decimal places viewed in complex numbers

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   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 8,651
Default How do I modify the decimal places viewed in complex numbers

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
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
Why do my numbers keep going down decimal places? Excell2002ishard Setting up and Configuration of Excel 2 March 27th 08 09:36 PM
Why do my numbers keep going down decimal places? Excell2002ishard Setting up and Configuration of Excel 2 March 27th 08 08:09 PM
How to change complex 0.122345687+0.87659454j to 3 decimal places erwan Excel Discussion (Misc queries) 3 March 4th 08 03:18 PM
Sum of numbers with only two decimal places wrong Excelgonecrazy Excel Discussion (Misc queries) 2 November 13th 07 07:21 PM
Subtracting two 2-decimal place numbers gives result 13-decimal places? [email protected] Excel Worksheet Functions 5 March 12th 07 10:38 PM


All times are GMT +1. The time now is 06:12 PM.

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

About Us

"It's about Microsoft Excel"