Forum Discussion
richzip505
Sep 23, 2024Copper Contributor
Variable cell reference for subtraction formula
Hello, If I have the below data, I want to find out the total duration on each employee's last day of work. This would essentially be the end time of the last event, minus the start time of the ...
- Sep 23, 2024
In D2:
=IF($A2=$A3, "", $C2-MIN(IF(($A$2:$A$18=$A2)*(INT($B$2:$B$18)=INT($B2)), $B$2:$B$18)))
Adjust the ranges $A$2:$A$18 and $B$2:$B$18 for your setup.
Format D2 as a time, then fill down.
HansVogelaar
Sep 23, 2024MVP
In D2:
=IF($A2=$A3, "", $C2-MIN(IF(($A$2:$A$18=$A2)*(INT($B$2:$B$18)=INT($B2)), $B$2:$B$18)))
Adjust the ranges $A$2:$A$18 and $B$2:$B$18 for your setup.
Format D2 as a time, then fill down.
- richzip505Sep 29, 2024Copper ContributorThank you!