I have a spreadsheet with a list of times to complete a task and the date it occurred. For each row, I would like to find the time difference vs the minimum value for that date.
I tried a min/vlookup function, but that just gives me the time of the last entry for that date, not the minimum time for the date.
Here is some sample data:
3/24/2013 38.324
3/24/2013 38.96
3/24/2013 40.354
4/13/2013 50.508
4/13/2013 50.695
4/13/2013 50.722
EDIT:
I would like the data to look like this:
DATE <> SECONDS <> DIFF
3/24/2013 <> 38.324 <> 0
3/24/2013 <> 38.96 <> 0.636
3/24/2013 <> 40.354 <> 2.03
4/13/2013 <> 50.508 <> 0
4/13/2013 <> 50.695 <> 0.187
4/13/2013 <> 50.722 <> 0.214
EDIT 2:
Also, there may not be the same number of entries for each date. So I would prefer to be able to just drag the formula down and then
1. have it figure out the date of the current row
2. find the minimum value of the range of entries for that date
3. calculate the difference between the time record on that row and the minimum time of that date.
Considering your data is on
A1:B6
Enter to
C1
:=MIN(IF($A$1:$A$6=A1,$B$1:$B$6))
This will give you minimum grouped by date. This is an array formula so useCTRL+SHIFT+ENTER
to enter the formula.And enter to
D1
:=C1-B1
Difference from minimum for the date.Then drag down
C1
andD1
cells to copy down the formulas.Or you can put both formulas together into one cell
C1
:=MIN(IF($A$1:$A$6=A1,$B$1:$B$6))-B1
, Again useCTRL+SHIFT+ENTER
to enter the formula.Pivot table. Dates on the rows, 'values' column as the values, summarize by
min
. You can specify the summary function by right clicking in the value field (otherwise it will default tocount()
orsum()
).Your results should look like this: