Hello.
The time value in the cells in column "start.time" should be subtracted from the time value of the respective cell in column "end.time", and the result inserted in the respective cell in the next empty column, when executing the macro via a button.
The calculation is not performed via the macro, because, I think, of the formatting of the cells in columns "start.time" and "end.time". I tried to format them as Text and Time, manually and via the macro, but the error persists. I do get the correct result, when I simply subtract the values via a formula (e.g. =B2-A2).
Does anyone know what the issue is in the vba code?
I attached the xlsm file. subtract_time.xlsm
Thanks! Sophia
Bookmarks