Make a cell not equal less than a certain number

K

Karl Davidson

I am making a time sheet that has the punch in and out times. An employee’s
work day is a minimum of 5 hours or greater. For an example: an employee
works 3 hours, they received 5 hours credit. I have a cell that has the
total hour’s work and another cell with their hourly pay. What is the
formula to make the total day’s hour cell not less than 5 hours?
 
T

T. Valko

Try something like this...

A1 = start time
B1 = end time

=IF(COUNT(A1:B1)=2,MAX(MOD(B1-A1,1)*24,5),"")
 
K

Karl Davidson

Thank you for your help. Another question is how does one computer hours and
minutes past midnight? I currently am using the following formulas in three
different cells which deals with time only.
=(StartTime-INT(StartTime))*24
=(EndTime-INT(EndTime))*24
=TEXT(EndTime-StartTime12,"0.00")
 
T

T. Valko

Another question is how does one computer hours
and minutes past midnight?

That's already built into my formula. This is the portion that does that:

MOD(B1-A1,1)

And then multiplying by 24 converts it for display as a decimal value:

MOD(B1-A1,1)*24

A1 = 11:00 PM
B1 = 7:00 AM

=MOD(B1-A1,1)*24 = 8
 
K

Karl Davidson

Once again, thank you. Don’t quite understand why the 1 is in the formula.
Nevertheless, it works. With this timesheet, I have to compute a night pay
rate for those who work between 22:00 to 06:00 the following day. Can this
information be taken from the Start Time and Ending Time?
 

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

Top