Jun 01 2022 03:42 AM - edited Jun 01 2022 03:45 AM
This is the formula I’m using the calculate the time a employee has worked for me. However I’m trying to figure out how to stop the counter once they are terminated. Does anyone have a better formula?
Jun 01 2022 04:16 AM
You'll have to add a column in which you enter the date employment ended. It'll be blank if the person is still employed.
Let's say that you use column J for this. You can then replace TODAY() with IF(J6="",TODAY(),J6) in the formula.
Remark: DATEDIF with "MD" as 3rd argument is not reliable. See DATEDIF function for a workaround.
Jun 01 2022 04:19 AM
Jun 01 2022 04:24 AM
That would require VBA, you cannot do that with a formula only.