View Single Post
  #10   Report Post  
Posted to microsoft.public.excel.newusers
Martin Fishlock Martin Fishlock is offline
external usenet poster
 
Posts: 694
Default Macro Programing

Hi I believe that each week is sperate so you want:

standard time: =min(a1,40)+min(a2,40) (32+40)
overtime =a1+a2-[cell above] (32+42-72)

how are your cells formatted as time hh:mm or numbers how do you deal with
seconds and minutes?
if it is formatted as time format the answers as custom [h] or [h]:mm
[h]:mm:ss

so that it will show total hours and not days and hours.



--
Hope this helps
Martin Fishlock, Bangkok, Thailand
Please do not forget to rate this reply.


"¿Confused?" wrote:

Excel won't accept it like that, you can't use the greater than or less than
signs. I'm trying to make it calculate hours on payroll, where if you had a
total of 32 hours for week one in cell A1, and a total of 42 hours for week
two in cell A2, that it would take the total hours < 40.01 for both weeks and
add them together, so that the total would be 72 hours. The next part of
that is that I would also need an equation that would take the 2 hours extra
and put them in a different cell, so that it would show the overtime hours
worked. In reality I need two equations one for cell A3 which would be
regular hours worked : =SUM(A1<40.01,A2<40.01)
and cell A4 which would be overtime hours worked : =SUM(A140.01,A240.01)

--
¿Confused?


"Bob Phillips" wrote:

So if ... it was just straight equations, it would look sort of like this:
=SUM(A1<40.01,A2<40.01) ..., why isn't it straight equations?

--
---
HTH

Bob

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



"¿Confused?" wrote in message
...
I do a payroll for my company on excel, and everyone but me is living in
the
stone age. They still haven't figured out =Sum(A1,A2). Anyways, I'm
trying
to write a macro to help me make less mistakes. If it was just straight
equations, it would look sort of like this: =SUM(A1<40.01,A2<40.01). If
anyone can help, I would appreciate it!
--
¿Confused?