What happens if the period spans midnight?
I would use one function and pass B4 and C4. Let the function call HMS2S for
both cells and adjust if the value from C4 is less than B4. Of course, this
will not work for time periods over 24 hrs. In that case, you would have to
indicate the day as part of the time value.