How to subtract figures within a cell?

In each cell of a column I have a time range, e.g., [02.30-08.30]. I want to create a new column which shows the total hours within that range, so 8.30-2.30 = 6.

Is there a way for me to do this without having to manually do every single calculation?

There are also some cases where it is [23.30-04.00] for example, in which case I cannot do a simple subtraction do get the figure I want of 4.5.

It would be very helpful if I can get a solution to the former case. Even better if I can get a solution to the latter, more complicated, case.

@ManyWords ,
16334 columns are not enough for them that they have to squeeze everything into one cell?

2 Likes

https://web.archive.org/web/20210507043509/http://www.ooowiki.de/CalcFunktionenDatum(2f)RechnenMitDatumUndZeit.html

1 Like
=MOD(TIMEVALUE(SUBSTITUTE(MID(A1; 7; 5); ".";":")) - TIMEVALUE(SUBSTITUTE(MID(A1; 1; 5); ".";":"));1)

SubtractDates.ods (9.2 KB)