Hi,
I have a timesheet where the user enters start and end time for each day. The calculated cell below gives the difference between start and end time i.e. number of hours worked.
I want to split the hours worked into Normal Hours and Overtime Hours.
For Normal Hours I am using =IF(SUM(E28:I28)>40,"40","SUM(E28:I28)).
For Overtime Hours I am using =IF(SUM(E28:I28)>40,"SUM(E28:I28)-40","0")
The first calculation just gives the total hours, not 40 and the second calculation gives 0.
I seem to think it has to do with the format. Can I use another function or should I use vba code? What code will work?
Thanks.
I have a timesheet where the user enters start and end time for each day. The calculated cell below gives the difference between start and end time i.e. number of hours worked.
I want to split the hours worked into Normal Hours and Overtime Hours.
For Normal Hours I am using =IF(SUM(E28:I28)>40,"40","SUM(E28:I28)).
For Overtime Hours I am using =IF(SUM(E28:I28)>40,"SUM(E28:I28)-40","0")
The first calculation just gives the total hours, not 40 and the second calculation gives 0.
I seem to think it has to do with the format. Can I use another function or should I use vba code? What code will work?
Thanks.