View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Vacuum Sealed Vacuum Sealed is offline
external usenet poster
 
Posts: 259
Default Rounding up/down time

Hi All

As the subject suggests, more importantly, is it possible.

I use the following as a Time Stamp.

Sub TimeStamp()
ActiveCell.NumberFormat = "hh:mm"
ActiveCell.Value = Now()
End Sub

I need assistance for the correct Syntax Structure to incorporate the
MINUTE() Formula to work inside the above routine so that when the user hits
the time stamp it stamps the time to the closest 5 minutes.

eg

If it is 15:41, it would stamp 15:40, conversely, 16:44 = 16:45..

Appreciate your help

TIA
Mick.