Fellow EXCELers,
Need help with a formula to calculate the nr of hours for an employee within a specified date range.
Thanks much!
Fellow EXCELers,
Need help with a formula to calculate the nr of hours for an employee within a specified date range.
Thanks much!
Posting some data would be helpful. You are basically walking into a Mechanic and saying "There is a problem is with the car, thanks!" and then leaving.
You should hit F5, because chances are I've edited this post at least 5 times.
Example of Array Formulas
Click the * below on any post that helped you.
New to the forum and not sure how to do that. Sorry!
Click on "Go Advanced" and then click on the paper clip icon at the top.
Actually, I was thinking even something like:
"For example;
Column A contains the ID number for an employee
Column B contains a start time
Column C contains an end time
Column D contains the date of the shift.
I wish to enter an employee ID into G1, a start time into F1, and an End Time in F2. I need a formula to calculate the number of hours worked by that employee between those two dates"
Can you modify that or something? I mean your original question is similar to posting on here with "i have a question with a formula" and nothing else. It's so vague it would be impossible for someone to give you an accurate response. Type out some requirements, examples of your data, or go to the "go advanced" section and upload a sample file, help us to help you!
Last edited by Speshul; 09-02-2014 at 12:32 PM.
Double post
I've attached a sample data of the file i have.
BTW, column A is the employee ID, B is the nr. of hours worked, C is the date
Enter:
Employee ID into F2
Start Date into F3
End Date into F4
This formula into F5:
=IFERROR(SUMPRODUCT(($A$1:$A$19=$F$2)*$B$1:$B$19*(F3<=C1:C19)*(F4>=C1:C19)),"Not Found")
Let me know if this works for you.
Why the IFERROR?
Here's another one...
=SUMIFS(B1:B19,A1:A19,F2,C1:C19,">="&F3,C1:C19,"<="&F4)
Biff
Microsoft MVP Excel
Keep It Simple Stupid
Let's Go Pens. We Want The Cup.
It worked like a charm!! Thanks much!!
You're welcome. We appreciate the feedback!
If your question has been solved please mark the thread as being solved.
In the menu bar above the very first post select Thread Tools, then select Mark this thread as solved.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks