Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
Display Modes | |
|
|