Hi,
First what I noticed is that you now have time and date not in adjacent columns but separate.
A minor modification shall be applied to show the UDF where are dates located, for instance passing this by additional argument:
it can be used then in calculation of starttime:
of course, as the name of the function is now different, it assigning result to function name lines have to reflect this:
F3 formula shall read:
and copy down
in D3 you can either leave old version (if in VBA module you fave both functions) or use (if only nev version is in module).
This does not address the issue you have shown in comments - I'm a bit "slow thinker", so write in "big letters" like:
time in F5 shall be 110 because it is the same day (B4 and B5), takes start time from .... and end time from E5(?) and includes all breaks in between.
whole code is:
Bookmarks