Calculate the difference between OUT time and IN time and ignore empty Out time instead use current time

sivarythm

New Member
Joined
Mar 25, 2020
Messages
1
Office Version
  1. 365
Platform
  1. Windows
I am looking for a macro code or formula to return the total elapsed time from multiple in and out using current time.(See attached image)

Here I am calculating the time difference between out time- in time to find staff field hours and also I'm alerting the field staff if he spent more than 6 hrs in the field using rolling time(Current time -in time). But My formula returns error, if there is no value in IN time. could you please suggest any solution?. thanks
 

Attachments

  • Rolling Time.jpg
    Rolling Time.jpg
    99.8 KB · Views: 32

Excel Facts

VLOOKUP to Left?
Use =VLOOKUP(A2,CHOOSE({1,2},$Z$1:$Z$99,$Y$1:$Y$99),2,False) to lookup Y values to left of Z values.
You could try

=MAX(0,IF(...))+MAX(0,IF(...))

But that will only work if the blank cells are empty, if they are formulas that show "" then it will need more changes.
 
Upvote 0

Forum statistics

Threads
1,223,243
Messages
6,170,967
Members
452,371
Latest member
Frana

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top