Time Formula

G

Gav123

Hi All,

I'm hoping that someone can help me with this formula

I have a process (D14) then the Start time (G14), End time (H14) and Pass or
Fail (I4), if the specific process takes longer than it should do then it's a
fail (the formula works for this). The time's are formatted dd/mm/yyyy
hh:mm:ss

=IF(OR(D14="process1",D14="process2",D14="process3",D14="process4",IF(H14<=G14+"01:00:00","Pass","Fail"),IF(OR(D14="process5",D14="process6"),IF(H14<=G14+"23:59:59","Pass","Fail")))

The problem is this is....for example "process7" must be completed by 2pm
(14:00) on the same it was started.
Can someone please tell me what formula I need to make this work and how can
I other process with different finishing times?

I hope that I have explained this ok.

Thanks in advance,

Gav.
 
B

Bob Phillips

=IF(OR(D14="process1",D14="process2",D14="process3",D14="process4"),IF(H14<=G14+"01:00:00","Pass","Fail"),
IF(OR(D14="process5",D14="process6"),IF(H14<=G14+"23:59:59","Pass","Fail"),
IF(AND(D14="process7",DAY(H14)=DAY(G14),HOUR(H14)<=14),"Pass","Fail")))

--
---
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)
 
G

Gav123

Great it worked, thanks Bob your a star...

Gav.

Bob Phillips said:
=IF(OR(D14="process1",D14="process2",D14="process3",D14="process4"),IF(H14<=G14+"01:00:00","Pass","Fail"),
IF(OR(D14="process5",D14="process6"),IF(H14<=G14+"23:59:59","Pass","Fail"),
IF(AND(D14="process7",DAY(H14)=DAY(G14),HOUR(H14)<=14),"Pass","Fail")))

--
---
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)
 
G

Gav123

Sorry Bob, I Spoke too soon...

When I enter the time in H14 as 14:01 I'm getting the result as Pass when it
should be a Fail as it is after 14:00.

Any more ideas??

Thanks,

Gav.
 
B

Bob Phillips

Sorry, sill mistake

=IF(OR(D14="process1",D14="process2",D14="process3",D14="process4"),IF(H14<=G14+"01:00:00","Pass","Fail"),
IF(OR(D14="process5",D14="process6"),IF(H14<=G14+"23:59:59","Pass","Fail"),
IF(AND(D14="process7",DAY(H14)=DAY(G14),HOUR(H14)<=13),"Pass","Fail")))

--
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)
 

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

Formula Macro 6
How does this formula work? 6
Time formula 6
Time management 1
compute date and time difference 5
VLOOKUP to return a sum/0 instead of #N/A? 3
Cell Refences 5
Time calculation problem 3

Top