Thread: Rounding time
View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
RachDobs RachDobs is offline
external usenet poster
 
Posts: 1
Default Rounding time

Hi all,
Do any of you clever people out there know how to get me out of little
problem??

What I want is a function that rounds time, either up or down, to the
nearest value.

What I am thinking is something along these lines:

Function RoundTime(Time as Date, RoundTo as Integer, RoundUp as
Boolean)

'Time - Inputted Time
'RoundTo - Round to nearest
'RoundUp - Round up if true else round down


End Function

What I want to be able to enter is a time and then for instance 15 so
that the entered time is rounded to the nearest 15 mins depending on
whether it needs to be rounded up or down.

Thanks for any help in advance

Rach


---
Message posted from http://www.ExcelForum.com/