View Single Post
  #8   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Ron Rosenfeld Ron Rosenfeld is offline
external usenet poster
 
Posts: 5,651
Default Round a repeating decimal from a formula...

On Fri, 22 Feb 2008 15:40:01 -0800, Snake2135
wrote:

here's my situation: I need to round all decimals that result from an IMDIV
function to two decimal places. I have Excel 2007, I have already tried
numerous ROUND functions, formatted the cells to round to two decimal places.
But on repeating decimals it will not round, only on solid results it will
round to two decimal places, thanks in advance.


IMDIV returns a text string, so you cannot do a ROUND on either portion
directly.

You will need to operate separately on the real and imaginary coefficients.

For example, if the result of your IMDIV operation is in A1:

=COMPLEX(ROUND(IMREAL(A1),2),ROUND(IMAGINARY(A1),2 ))

Obviously, in the above, you could replace A1 with your IMDIV formula.
--ron