Home > Software design >  SUM function when ABS function is already in place
SUM function when ABS function is already in place

Time:05-19

Please bear with me I am not very savvy with XL/Google Sheets

I am trying to get my spreadsheet to calculate the hours I have worked for the month.

As I work nightshifts, when I enter a start time which is later than my finish time (i.e 19:00 start and 07:00 finish) it was giving me a duration of -12.

To get round this, I applied the ABS function, so that negatives showed up as positives.

However, when I try to calculate the hours at the bottom, it is giving me a strange value which is not correct if it was calculating SUM using the original negative values, nor is it correct if it is using the values generated by the ABS function.

Can someone advise me what I am doing wrong (in dummy terms - I literally had to google everything about the ABS function - I am not spreadsheet literate at all, the little I have learned came from googling like $h*t).
ABS Function SUM Function Fault showing value as 1.00 instead of either 0.00 or 24.00

CodePudding user response:

Replace the =ABS(E1-D1) with =MOD(E1-D1,1)*24 and sum should work correctly.

  • Related