#1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 287
Default Rounding

I have this code and I need to Round Time1 to two dec places.

Time1 = Lastcell * 12 / 60 / 60

Thanks in advance!

Aaron
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 923
Default Rounding

Time1 = Round(Lastcell * 12 / 60 / 60,2)

Cheers
Nigel

"Aaron" wrote in message
...
I have this code and I need to Round Time1 to two dec places.

Time1 = Lastcell * 12 / 60 / 60

Thanks in advance!

Aaron



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,624
Default Rounding

One way:

Time1 = Round(Lastcell/300, 2)

or, for MacXL/WinXL97:

Time1 = Application.Round(Lastcell/300,2)


Note the VBA's round works slightly differently than XL's ROUND(),
rounding a value ending in 5 to the nearest even number, rather than
always away from zero.

In article ,
"Aaron" wrote:

I have this code and I need to Round Time1 to two dec places.

Time1 = Lastcell * 12 / 60 / 60

Thanks in advance!

Aaron

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
ROUNDING FORMULA =ROUND(B12/$B$10,1) ROUNDING TO HIGH SunshineinFt.Myers[_2_] Excel Worksheet Functions 7 March 5th 09 06:41 PM
rounding Andrew Richards Excel Worksheet Functions 4 March 5th 09 12:06 PM
I need a formula with rounding up & rounding down to the nearest . Tony Kay Excel Worksheet Functions 3 May 29th 07 11:13 PM
Rounding up or down Kevin Excel Discussion (Misc queries) 4 January 22nd 07 12:51 PM
Rounding Andreas Håkansson Excel Worksheet Functions 5 March 29th 06 01:31 PM


All times are GMT +1. The time now is 08:39 AM.

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

About Us

"It's about Microsoft Excel"