Sep 25 2023 05:22 AM
In my spreadsheet, I have projects' start time/date and end time/date. I need to write an excel function that calculates how many hours were spent on the project that subtracts lunches, breaks, and weekends.
Sep 25 2023 05:34 AM
Sep 25 2023 05:39 AM
Thank you @Sergei Baklan! That's the function I'm using now, and it gives me the total time spent. The problem is I'm having to manually subtract weekends, lunches and breaks from the result.
Sep 25 2023 05:43 AM
I see. Perhaps you could give bit more details how your data is structured. In addition to start/end where and how breaks are defined, where are public holidays list, etc. Ideally with sample file.
Sep 25 2023 05:49 AM
Sep 25 2023 06:33 AM
Yes, it could work, but depends on HOW do you add such breaks. Is that one or many ones, same for each day or not, etc. You may not share your production file, but if you generate sample one with just 2-3 records (and without sensitive information) it'll be more clear. Without knowing of how data is structured it's hard to suggest any formula.