Using Excel formula to find employee working times - excel

I have an Excel sheet with over 1,500 rows of data. Each row tracks an employees start and stop time for a specific task and order number. I want to add up the total time for each person and/or location.
I tried VLOOKUP to try and do this, but it just returns an error. For example, if I want to look for Karen's total work time, I would do something like VLOOKUP(Karen,F:F,9,TRUE). What I get in return is an #REF!. I suspect this has to do with there being something like 100 rows that are related to Karen's work and the VLOOKUP isn't going to add all the values found together.
What I want is for the output, in one cell, to show the total time. I figured I might have to do something were it finds all of Karen's times and dumps them into a new column, and from there, I can sum them all up into a single cell to get the total time.
Example of Excel document

Like BigBen said in his comment, you should use SUMIFS to achieve that, along with a new column like you figured out.
I made a simple sheet in Google Sheets to exemplify it (functions used are the same in Excel).
Here's the link to it, and below is an image of it's contents:

Related

Time Code Comparison

I have a workbook that contains two sheets "Sign-In" and "Sign-Out". I have Last Name, First Name, ID, Date, and Time on each. I am trying to figure out the best way to compare the two sheets so that I can combine the data to tally hours worked each day.
I have tried to combine the ID and Date into one field and then run a INDEX | MATCH on between the sheets. I am comparing the two thinking that if the person signed in on a specific day then they should have a sign out on the same day. It is close but contains gaps that it says are N/A but that I can look at and see are true. So I am thinking that my hypothesis is wrong and I am not returning what I think I should be returning.
A:Timestamp B:LastName C:FirstName D:ID E:Blank F:Date G:Time H:Blank I:Comparison Data J:INDEX|MATCH Formula
My INDEX | MATCH formula looks like this:
=INDEX('Sign-Out'!G2:G1265,MATCH(I2,'Sign-Out'!I2:I1265,0))
I am not sure what I need to do here to get the results I am looking for in my table. Any help is appreciated...
Link to Sample Workbook: https://drive.google.com/file/d/1c3tA3jZghFhZzic4xWKVDhkYNlJeppv-/view?usp=sharing
Expected outcome is to have sign-in times match up to sign-out times on the same day. There are holes in the data but I expected that all data that can match will match.
Using your provided sample workbook, you don't need a Comparison column at all, so can get rid of that entirely. I would make column H on your "Sign-In" sheet a "Time-Out" column, and then use this formula in cell H2 and copy down:
=IF(COUNTIFS('Sign-Out'!D:D,D2,'Sign-Out'!F:F,F2)=0,"No Sign-Out Time",MOD(SUMIFS('Sign-Out'!A:A,'Sign-Out'!D:D,D2,'Sign-Out'!F:F,F2),1))
Make sure to format the cells as Time [$-409]h:mm AM/PM;# so that they display the results properly.

Excel SUM COUNTIFS from different tables and futureproofing

I'm practising MS Excel skills. I have a workbook in which I want to analyses data from different tables.
Each worksheet contains a table with the information from the year. So in worksheet "2017" I have a table named "Table2017". I have this for each year (starting 2015).
After a some research, I finally found a way to count how many times something in a certain place happened.
=SUM(COUNTIFS(Table2018[Place];B3;Table2018[Activity];{"Paid";"Awarded"}))
+SUM(COUNTIFS(Table2017[Place];B3;Table2017[Activity];{"Paid";"Awarded"}))
+SUM(COUNTIFS(Table2016[Place];B3;Table2016[Activity];{"Paid";"Awarded"}))
+SUM(COUNTIFS(Table2015[Place];B3;Table2015[Activity];{"Paid";"Awarded"}))
This works perfectly. It will calculate how many times per place a paid service or an awarded (gifted/sponsored) service was delivered. In the B column, I have a list of places (hence the B3 reference), so after completing the formula, I can select the cell and enlarge/drag to copy it to the rest of the column and apply for every place.
However, the formula is really long and every year upon creating a new worksheet, I need to add a new part to the formula.
Is there a way to compact this? And ideally have the formula search for every table that has the relevant information (like: "Table20??" or "Table 20*"), go in and count the times my conditions are found?
I hope my question is clear enough.
Thanks in advance!
P.S. I have zero experience in VBA/VBS, so I'm hoping to realize this in a normal formula.
There are ways to make it more compact, but they will necessarily make the function more complicated, so it wont be any easy win. See for yourself:
you basically need to be able to cycle through the years inside formula without creating custom formulas. One way to do this is to use ROW inside INDIRECT function. This way you can replace multiple
Table2015[Place]
with one array function containing
INDIRECT("Table"&ROW($A$2015:$A$2018)&"[Place]")
as it is an array function it will essentially cycle through the cells in the ROW function creating Table2015[Place], Table2016[Place], Table2017[Place] and Table2018[Place]. Your whole formula would look something like this
=SUM(COUNTIFS(INDIRECT("Table"&ROW($A$2015:$A$2018)&"[Place]");B3;INDIRECT("Table"&ROW($A$2015:$A$2018)&"[Activity]");{"Paid";"Awarded"}))
and it must be entered using ctrl+shift+enter (you will see {} brackets around the function). This should work to make the function smaller and you will need only to change the cell reference each year instead of adding another sum, but the question is if the separate sums are not easier to read and maintain.

How to do this lookup operation in Excel

There are two sheets (sheet1 & sheet2) in my Excel file, it's like daily work routine (entry date, pickup date, dispatch date). Some details will change as per the work flow and even new entries will appear.
I just need to compare both files if a change occurred in one cell it must have to show entire row of sheet1 (I can't specify exact headline for that all details are too precious and it has more than 100 headlines).
So if there is any formula for that please let me know like
IF+VLOOKUP
please correct below given formula
=If(RECHERCHEV(A2,sheet1!A8:FM264,1,FAUX)=(RECHERCHEV(A2,sheet2!A8:FM257,1,FAUX);"";RECHERCHEV(A2,sheet1!A8:FM264,1,FAUX))
It's the French version.
Try this array formula in cell A1 of sheet3 and drag across and down.
=IF(AND(EXACT(Sheet1!1:1,Sheet2!1:1)),"",Sheet1!A1)
Not really sure what you're looking to do here, and I don't speak french, but it looks like you have an extra parenthesis before your 2nd RECHERCHEV function.
Try this :
=If(RECHERCHEV(A2,sheet1!A8:FM264,1,FAUX)=RECHERCHEV(A2,sheet2!A8:FM257,1,FAUX);"";RECHERCHEV(A2,sheet1!A8:FM264,1,FAUX))
Though I'm not sure why the IF function uses semi-colons, but the RECHERCHEV uses commas, so maybe this:
=If(RECHERCHEV(A2,sheet1!A8:FM264,1,FAUX)=RECHERCHEV(A2,sheet2!A8:FM257,1,FAUX),"",RECHERCHEV(A2,sheet1!A8:FM264,1,FAUX))
Also it seems you want the entire row to update, so I am not sure how this vlookup would work since the arrays start in different rows than the lookup value.

Excel - Finding nth largest value with duplicate data

I have a the following table, it has more columns and is 40 rows long
but this is an example of the data. The table is sorted by Team #
Data Table
I am trying to create a 2nd table that shows the top 10 teams that
delivered gears. I want to do this for the other columns as well.
I am trying to do this without VBA.
I used this function and it worked well:
=INDEX(TT_Team,MATCH(LARGE(TT_Tele_Gears,$A3),TT_Tele_Gears,0))
The problem is the duplicate data for the amount of gears delivered
IF two teams have delivered the same number of gears I want to show
them both, but do not care about which is #1 or #2
Currently I get this:
Top 10 Table
Any ideas on a fix ?
Thanks in Advance
You could try a solution like this:
The formula in F2 copied down is just:
=LARGE(B$2:B$12,D2)
and in E2 as shown it's this:
=INDEX(A$2:A$12,LARGE(IF(B$2:B$12=F2,ROW(B$2:B$12)-ROW(B$2)+1),COUNTIF(F2:F$6,F2)))
confirm with CTRL+SHIFT+ENTER and copy down
It's the COUNTIF part at the end that makes the difference. This is counting from the current row, so for duplicates as you go down the column the COUNTIF value changes, so you get each duplicate

Excel Q: How do I get the sum of each category for each person?

I need to collate the total numbers for each type of document that students send to me:
Example document:
For example, for "PK" (in the second table,) I need to calculate the total number of "Journal," "Miscellaneous Review," and so on. Is there any formula that will help me do this?
Edit:
Sample doc 2
This seems to be a very easy SUMIFS problem.
Using your sheet, the code should be:
=SUMIFS($C:$C,$B:$B,N$2,$D:$D,$M3)
Just copy and paste for all the cells you need.
For future reference, you should really show any efforts you have tried previously

Resources