Stop time - start time calculation

S

squack21

This formula gives me a error message every time I enter something in the
worksheet: =D4-C4+IF(C4>D4,1). It says Excel ran out of recourses and the
formula could not be evaluated. Originally I was lookin for a formula that
would calculate minutes of production time per shift. AM to PM and PM to AM.
I am formatting my start and stop time as h:mm AM/PM and my result of the
above formula as [m].
 
L

Luke M

You didn't give a value for what to do if false. Thus, when you get a false
condition, its trying to add numbers to the word FALSE and messing up.

You could try
=D4-C4+IF(C4>D4,1,0)
 
D

David Biddulph

You don't need the IF function. You could use =D4-C4+(C4>D4)

But I don't know why you're getting the report of resource problems with
that particular formula. That error message is usually associated with
large array formulae:
http://support.microsoft.com/kb/166342.
 
T

T. Valko

Don't know why you're getting that message but here's another way to write
that formula:

=MOD(D4-C4,1)

Or:

=D4-C4+(C4>D4)
 
D

David Biddulph

Are you sure, Luke? Have you checked?

The false condition will not return the *word* FALSE but the *boolean value*
FALSE, and that will evaluate to zero (just as TRUE will evaluate to 1),
which is why the IF function is unnecessary. [But it should not cause that
error.]
--
David Biddulph

Luke M said:
You didn't give a value for what to do if false. Thus, when you get a
false
condition, its trying to add numbers to the word FALSE and messing up.

You could try
=D4-C4+IF(C4>D4,1,0)
--
Best Regards,

Luke M


squack21 said:
This formula gives me a error message every time I enter something in the
worksheet: =D4-C4+IF(C4>D4,1). It says Excel ran out of recourses and
the
formula could not be evaluated. Originally I was lookin for a formula
that
would calculate minutes of production time per shift. AM to PM and PM to
AM.
I am formatting my start and stop time as h:mm AM/PM and my result of
the
above formula as [m].
 
S

squack21

I tried all of your suggestions and I still get the same error message. I
should state that I am using Microsoft Office Professional Plus 2007. I am
wondering if displaying the time as military time would make a difference.
If someone would like I could send you a copy of the spreadsheet I am working
 

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


Top