[Dropped] Cells with time show a negative value

Discuss the spreadsheet application
Post Reply
Gibbanator
Posts: 14
Joined: Thu Jan 14, 2010 9:00 pm

[Dropped] Cells with time show a negative value

Post by Gibbanator »

 Edit: Split from How to sum range of time? since new person needs new topic. 
squenson wrote:Then if you see -632 hours, it is most probably because one of the time in the row above is not on the same day as the others. Use the same format on each row for the cells that represent the total time per day, and let us know which formula you used to calculate the 8 hours per day, may be there is something wrong in it. Format your cells as numbers to see the exact content.

Or attach a copy of your file (use the tab "Upload Attachment" just below the "Submit" button when you create a post.
So this does not work. I am having same problem as Markmont. If I change all the cells to the same format then each of them show a minus number for the time like this: https://i.gyazo.com/90c7a59e8489309e796777b01acfdc26.png.
J0.png
J0.png (10.36 KiB) Viewed 1625 times
Here is the format used: https://i.gyazo.com/2e4e1cc7f6d17c07cb88a869da715ba4.png
J1.png
and this is what it looks like when I change them all to the format you suggest: https://i.gyazo.com/3766f7d47f27619f5cd627e31700b7cf.png.
J2.png
If I use the normal format HH:MM:SS they show correct. Only the Total w/Lime total will not add over 24 hours. Dragging my file here does not load it and I do not see a place to load it.
Last edited by MrProgrammer on Sun Sep 05, 2021 7:37 pm, edited 4 times in total.
Reason: Attached images since web links to gyazo.com will surely break; Dropped: No attachment from Gibbanator
Open Office 3.1
User avatar
robleyd
Moderator
Posts: 5082
Joined: Mon Aug 19, 2013 3:47 am
Location: Murbko, Australia

Re: Cells with time show a negative value

Post by robleyd »

See How to attach a document for details regarding attaching a document.
Cheers
David
OS - Slackware 15 64 bit
Apache OpenOffice 4.1.15
LibreOffice 24.2.2.2; SlackBuild for 24.2.2 by Eric Hameleers
User avatar
RusselB
Moderator
Posts: 6646
Joined: Fri Jan 03, 2014 7:31 am
Location: Sarnia, ON

Re: Cells with time show a negative value

Post by RusselB »

The negative numbers are occurring due to the fact that the system isn't seeing a difference in date.
If you go from 2:00 pm to 1:00 am, and don't specify the dates, the system presumes that the date portion for both times is the same, thus you get a negative number of hours.
You know that's not possible (time travelers excluded), but the computer doesn't.
Simply include a date portion along with the time and your numbers should work correctly.
OpenOffice 4.1.7, LibreOffice 7.0.1.2 on Windows 7 Pro, Ultimate & Windows 10 Home (2004)
If you believe your problem has been resolved, please go to your first post in this topic, click the Edit button and add [Solved] to the beginning of the Subject line.
User avatar
Villeroy
Volunteer
Posts: 31279
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany

Re: Cells with time show a negative value

Post by Villeroy »

=end-start+(end<start)
adds one day if the end time is smaller than the start time.
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
Post Reply