I'm looking for a way to concatenate two time period values in one Excel 2010 cell. This is a Excel sheet for my office, in which my working hours should be listed. Beside other values, which are not relevant for this, there are four columns:
Column A contains the datevalue.
Column B contains the start time for this date.
Column C contains the end time for this date.
Column D contains the time period for this date.
Until now, it's a very simple sum of the time period values in the fields above.
=SUM(D$5:D$26)
which is formatted as [hh]:mm
--> e.g. "168:00"
I want to improve this, to show up with additional information of overtime / undertime... and I expect it to look like "180:30 (+12:30)" or "155:15 (-12:45)"
I tried to concatenate it like this
=SUM(D$5:D$26) & " (" & SUM(D$5:D$26;-(COUNTIF(D$5:D$26;"*")*1/3)) & ")"
but it doesn't work out :( Currently, my formula returns for my two example dates with 10:00 and 10:30 worktime "0,854166666666667 (-5,8125)"
To calculate the current over-/undertime, I wanted to sum up all days, which have a value in the worktime period, and multiply it by the daily work period (8 hours). This seems to be wrong in my formula, but I could not find the error :(
I do not know, how to format the substrings before the concatenation... do you have any idea?