Thread: Rounding cents
View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Claus Busch Claus Busch is offline
external usenet poster
 
Posts: 3,872
Default Rounding cents

Hi Hakan,

Am Tue, 22 Jan 2013 07:50:13 -0800 (PST) schrieb Håkan Björkström:

I just faced an annoying problem in Excel. I need to convert an euro sum (e.g. ?49.80) into text formatted as the integer part four characters long with leading zeros and accordingly cents two characters long with leading zeros. Example, euro 49.80 should be presented as 004980. When I calculate the cent part it will result in 79, not 80. I have to find out a formula which always presents the cent figure correctly, not too small not too big.


your euro sum in A1:
=ROUND(A1*100,-1) and custom format "000000"
or as text:
=TEXT(ROUND(A1*100,-1),"000000")


Regards
Claus Busch
--
Win XP PRof SP2 / Vista Ultimate SP2
Office 2003 SP2 /2007 Ultimate SP2