Solved

formulas for timesheet analyses

Posted on 2013-11-05
4
196 Views
Last Modified: 2013-11-06
I have timesheet data collected from a fingerprint reader and have organized it in a pivot table on sheet 2 of the attached file.

I would like to get formulas in columns BA to BE for

Total hours worked
No of days counted
Average hours worked on each day
No of days worked less than 8 hours

whenever a time in as well as a time out is recorded.

In addition I would like to have a count of days present whenever there is at least one of time in and time out recorded.
Attendance.xls
0
Comment
Question by:Saqib Husain, Syed
  • 2
4 Comments
 
LVL 12

Expert Comment

by:Harry Lee
ID: 39626153
ssaqibh,

You time log data doesn't seem to be completed. Most people don't have both In and Out time. That creates a big problem in calculating the time.
0
 
LVL 80

Accepted Solution

by:
byundt earned 500 total points
ID: 39626289
There was no "Out" column that corresponded to the "In" of column AZ, so I inserted an extra column before your requested formulas.

I used offset ranges along with a test for even/odd column numbers to test for times being reported for both "In" and "Out". This forced me into a SUMPRODUCT formula.

Total hours worked
=SUMPRODUCT($E6:$BA6*ISODD(COLUMN($E6:$BA6))*($D6:$AZ6<>"")*($E6:$BA6<>""))-SUMPRODUCT($D6:$AZ6*ISEVEN(COLUMN($D6:$AZ6))*($D6:$AZ6<>"")*($E6:$BA6<>""))

Number of days worked
=SUMPRODUCT(($D6:$AZ6<>"")*($E6:$BA6<>"")*ISEVEN(COLUMN($D6:$AZ6)))

Average number of hours worked
=BB6/BC6

Number of days worked less than 8 hours
=SUMPRODUCT(($D6:$AZ6<>"")*($E6:$BA6<>"")*(($E6:$BA6-$D6:$AZ6)<8/24))

Number of days with time reported
=COLUMNS($D6:$BA6)/2-SUMPRODUCT(($D6:$AZ6="")*($E6:$BA6="")*ISEVEN(COLUMN($D6:$AZ6)))DUCT(($D6:$AZ6<>"")*($E6:$BA6<>"")*(($E6:$BA6-$D6:$AZ6)<8/24))/BC6
AttendanceQ28286392.xls
0
 
LVL 80

Assisted Solution

by:byundt
byundt earned 500 total points
ID: 39626323
My formula for number of days worked less than 8 hours was wrong. It needed to include a test for even column number.
=SUMPRODUCT(($D6:$AZ6<>"")*($E6:$BA6<>"")*ISEVEN(COLUMN($D6:$AZ6))*(($E6:$BA6-$D6:$AZ6)<8/24))
0
 
LVL 43

Author Closing Comment

by:Saqib Husain, Syed
ID: 39627032
Great, thanks

Saqib
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

What is a Form List Box? (skip if you know this) The forms List Box is the alternative to the ActiveX list box. If you are using excel 2007, you first make sure you have a developer tab (click the Orb)->"Excel Options"->Popular->"Show Developer tab…
INDEX and MATCH can be used to great effect to replace HLOOKUP and VLOOKUP as it does not have the limitation of needing the data to be sorted so that the reference value is in the first column or row. It also has the ability to perform a bi-directi…
Viewers will learn the basics of slicers and timelines for both PivotTables and standard Excel tables in Excel 2013.
The viewer will learn how to simulate a series of coin tosses with the rand() function and learn how to make these “tosses” depend on a predetermined probability. Flipping Coins in Excel: Enter =RAND() into cell A2: Recalculate the random variable…

747 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now