+ Reply to Thread
Results 1 to 6 of 6

Wrong sum of time, problem with conditional formatting

  1. #1
    Registered User
    Join Date
    09-20-2015
    Location
    Haarlem, The Netherlands
    MS-Off Ver
    Office 2016
    Posts
    16

    Post Wrong sum of time, problem with conditional formatting

    Hi everyone,

    I'm making a simple workbook for my colleagues so they can keep track of how many hours they spend on their different tasks.
    It works as follows:

    In the second sheet, the user fills in their starting time in collumn D, their ending time in collum E and their breaktime in collumn F. Their total working time is shown in collumn G.
    In collumns J:S they can specify their spended hours per task. The sum of these hours are shown in collumn I as a check.
    I added a conditional formatting to collumn I. If it doesn't match with collumn G, the color of the text becomes red.

    So for so good, it looked like it worked as it should, but then someone worked for one hour, filled in the sheet correctly and the check in I2 remained red. He started at 10:00 and finished at 11:00. When I wanted to fix the problem and filled in (kind of by accindent) that he started at 9:00 and finished at 10:00, I2 did go back to its normal color..
    I have absolutely no idea where this came from. I added the workbook with different starting times, all shifts have a duration of one hour.

    I don't know if it has any effect in this matter, but I use the 1904 date system in this workbook, because I wanted a simple way to show negative hours on the first sheet. I found that solution somewhere on the internet. But, if I change this setting back to the 1900 date system, the cell in collumn I still remain red, so it seems that this isn't cause of the problem.

    Does anybody have any idea how this is possible? I hope I explained the situation clear enough.

    Cheers!
    Bossie94

    PS The text in the workbook is in Dutch, but I guess that won't be a problem for you, right?
    Attached Files Attached Files
    Last edited by Bossie94; 02-21-2017 at 04:49 AM.

  2. #2
    Forum Expert Logit's Avatar
    Join Date
    12-23-2012
    Location
    North Carolina
    MS-Off Ver
    Excel 2019 Professional Plus - 2007 Enterprise
    Posts
    7,014

    Re: Wrong sum of time, problem with conditional formatting

    I checked everything in your sheet that I could think of. Conditional Formatting, Cell Format, etc.

    Can't find anything wrong with it.

    Perhaps the workbook is simply corrupted ?

    Need to start again from scratch ?

  3. #3
    Banned User!
    Join Date
    02-05-2015
    Location
    San Escobar
    MS-Off Ver
    any on PC except 365
    Posts
    12,168

    Re: Wrong sum of time, problem with conditional formatting

    You mixed formats, TIME and NUMBER
    [deleted by author]

    1. All cells with time set to General format
    2. Retype all time this way: 01:00 or 1:00 (should automatically get Custom format hh:mm or h:mm)
    3. Probaly you will see red color on a few weeks
    4. If "red week" , edit first cell in this week in col. Totaal aantal uren, and use ROUND(). E.g. ROUND(old formula,5) and drag down to the end of "red week". Do the same for col. Check
    5. Change Format Cells Date/Time => Locale from Nepali to Dutch (Netherlands) (option)
    6. ROUND() can be used for all weeks (but too much work! )

    hope it will help.
    Last edited by sandy666; 02-21-2017 at 03:53 AM.

  4. #4
    Registered User
    Join Date
    09-20-2015
    Location
    Haarlem, The Netherlands
    MS-Off Ver
    Office 2016
    Posts
    16

    Re: Wrong sum of time, problem with conditional formatting

    Thank you both for replying!

    Logit, at first that was my biggest fear to. It didn't really take long to make, but starting from scratch would be quite frustrating.

    Sandy666, your solution worked! I can't see where I used the NUMBER format, but using your ROUND solution solved my problem!

    Thanks for taking the time to look at my problem

    Bossie94

  5. #5
    Banned User!
    Join Date
    02-05-2015
    Location
    San Escobar
    MS-Off Ver
    any on PC except 365
    Posts
    12,168

    Re: Wrong sum of time, problem with conditional formatting

    There was too many errors and I eliminate them step by step. That is why I said change from Nepali to Dutch.
    And don't format time cells by yourself, it should be General. It will take format from kind of input like I said above
    Good to know it works for you

    Thanks for feedback.

    btw.
    0.0416666666666667 <> 0.0416666666666666 RED because they are different
    ROUND()
    0.04166 = 0.04166 No Color
    Last edited by sandy666; 02-21-2017 at 05:19 AM.

  6. #6
    Forum Expert Logit's Avatar
    Join Date
    12-23-2012
    Location
    North Carolina
    MS-Off Ver
    Excel 2019 Professional Plus - 2007 Enterprise
    Posts
    7,014

    Re: Wrong sum of time, problem with conditional formatting

    Glad you have it sorted out.

    Cheers

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [solved] Conditional Formatting - what am I doing wrong?
    By nukularpower in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 01-09-2016, 08:36 PM
  2. [SOLVED] Solving a time problem with conditional formatting
    By smig123 in forum Excel General
    Replies: 4
    Last Post: 02-03-2014, 10:59 AM
  3. [SOLVED] Conditional Formatting - What am I doing wrong?
    By apaauwe in forum Excel General
    Replies: 8
    Last Post: 11-26-2013, 05:22 PM
  4. [SOLVED] Conditional Formatting is Wrong Color
    By LSC in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 07-07-2013, 07:52 PM
  5. Conditional Formatting Code - Deletes Wrong Conditional Format
    By RSpecianJr in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-29-2010, 10:53 AM
  6. Conditional Formatting Help-ome light on what I'm doing wrong
    By amsnss in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 07-03-2007, 10:38 AM
  7. Time and Conditional Formatting Problem
    By jonhunt in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 10-31-2006, 01:35 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1