View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.misc
Ron Rosenfeld Ron Rosenfeld is offline
external usenet poster
 
Posts: 5,651
Default How do I format complex numbers ?

On Tue, 4 Mar 2008 12:08:04 -0800, ks wrote:

When I do math operations with complex numbers, the results are shown in long
formats with many digits after the decimal point. Something like :

0.0358698745876568+0.099839597397397i

How can I change it to fewer digits? Please help!

ks


Complex numbers, in Excel, are entered as strings.

You have to round the real and imaginary parts separately, and then recombine
them.

e.g.

=COMPLEX(ROUND(IMREAL(A1),3),ROUND(IMAGINARY(A1),3 ),RIGHT(A1,1))

(although if your suffix is always an "i" or a "j", you can change the
RIGHT(A1,1) to "i" or "j").
--ron