Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
baj baj is offline
external usenet poster
 
Posts: 24
Default Timecalculations : How ?

Hi,


I would like to know how I can ADD time to a certain
timeregistration...


For instance I have a timeregistration 08:10:00
and I want to control if this registration is made before 08:00:00 or
in the first quarter (08:00:00 - 08:15:00)...


So 08:00:00 is the basic start

In fact I want to control this :


reg = format("08:10:00","hh:mm:ss")

If reg < format("08:00:00) or
reg UnknownTimeAddFunction("08:00:00","00:15:00") then

<...The registration wasn't in the first quarter...
....
endif


Perhaps this UnknownTimeAddFunction works with seconds ?
(a quarter hour = 900 seconds)
UnknownTimeAddFunction("08:00:00",900)
....


Ofcourse I want this instruction in VBA, not in the Excelworksheet
itself. If there is a way to subtract... please let me know


Hope for help,


Greetings,


baj

  #2   Report Post  
Posted to microsoft.public.excel.programming
baj baj is offline
external usenet poster
 
Posts: 24
Default Timecalculations : How ?

Hi,

Sorry I made some mistakes in the formal code, I'll try to do better in
the second version of this problem...

I would like to know how I can ADD time to a certain
timeregistration...


For instance I have a timeregistration 08:10:00
and I want to control if this registration is made before 08:00:00 or
in the first quarter (08:00:00 - 08:15:00)...


So 08:00:00 is the basic start


In fact I want to control this :


reg = format("08:10:00","hh:mm:ss")


If reg < format("08:00:00","hh:mm:ss") or
reg UnknownTimeAddFunction("08:00:00","hh:mm:ss") then


<...The registration wasn't in the first quarter...
....
endif


Perhaps this UnknownTimeAddFunction works with seconds ?
(a quarter hour = 900 seconds)
UnknownTimeAddFunction("08:00:00",900)
....


Ofcourse I want this instruction in VBA, not in the Excelworksheet
itself. If there is a way to subtract... please let me know


Hope for help,


Greetings,


baj

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default Timecalculations : How ?

I am not sure what you are doing, but maybe something like

If Range("A1").Value = TimeSerial(8,0,0) AND _
Range("A1").Value <= TimeSerial(8,15,0) THEN

' it falls in the first quarter hour

--

HTH

RP
(remove nothere from the email address if mailing direct)


"baj" wrote in message
ups.com...
Hi,

Sorry I made some mistakes in the formal code, I'll try to do better in
the second version of this problem...

I would like to know how I can ADD time to a certain
timeregistration...


For instance I have a timeregistration 08:10:00
and I want to control if this registration is made before 08:00:00 or
in the first quarter (08:00:00 - 08:15:00)...


So 08:00:00 is the basic start


In fact I want to control this :


reg = format("08:10:00","hh:mm:ss")


If reg < format("08:00:00","hh:mm:ss") or
reg UnknownTimeAddFunction("08:00:00","hh:mm:ss") then


<...The registration wasn't in the first quarter...
....
endif


Perhaps this UnknownTimeAddFunction works with seconds ?
(a quarter hour = 900 seconds)
UnknownTimeAddFunction("08:00:00",900)
...


Ofcourse I want this instruction in VBA, not in the Excelworksheet
itself. If there is a way to subtract... please let me know


Hope for help,


Greetings,


baj



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



All times are GMT +1. The time now is 11:03 PM.

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

About Us

"It's about Microsoft Excel"