Rounding up/down time

  • Thread starter Thread starter Vacuum Sealed
  • Start date Start date
V

Vacuum Sealed

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.
 
Hi Mick,

Am Tue, 21 Jun 2011 20:59:05 +1000 schrieb Vacuum Sealed:
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.

try this:
ActiveCell = Round(Time * 288, 0) / 288


Regards
Claus Busch
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Rounding Time down 4
Daily Time Sheets with Rounding 1
Rounding Time? 2
WCG Stats Thursday 11 March 2021 1
ACCESS 2003 CRASH EXAMPLES 9
Round UP Time 1
round function? 2
Record Click on Error Indicator 2

Back
Top