If Function is not working in Excel

12,103

You should trim the time difference to whole seconds resolution to avoid (invisible) errors in the IF clause.
Use =TRIM((F6-H6)*86400)/86400 in cell K6 to cut off any amount smaller than a second.

Second, if you just want to show the difference in minutes (instead of hh:mm) then use mm in a custom format - you don't need to replace one numerical value with the same numerical value ('3:30' with '210').

Share:
12,103

Related videos on Youtube

Qamar Naveed
Author by

Qamar Naveed

Updated on September 18, 2022

Comments

  • Qamar Naveed
    Qamar Naveed over 1 year

    I had made a sheet to calculate factory workers timing and payment against working and over time.

    First I made it in Excel 2013 and then I changed my Windows from 10 to 7 and also changed the software from Office 2013 to Kingssoft 2016. After that it started to give false answer and i have tried my best to solve it but all goes useless.

    Formula in L6 : =if(k6=time(03,30,00),"120") cell is formated as general and returning value is False... Cell K6 : 3:30 cell format is custom time.

    i am attaching the screen shot for better conclusions

    Screanshot.

    • Dave
      Dave almost 8 years
      I've had this exact issue whilst developing - turned out the milliseconds were truncated. Do you work at millisecond granularity?
    • CharlieRB
      CharlieRB almost 8 years
      Welcome to Super User. It is not clear what you are asking us. It is also not clear which software you are using. Please edit your question to clarify. Beyond that, I do not understand why you are using that formula since it does not calculate the minutes. Nor does 3:30 equal 240 minutes.
    • Scott Craner
      Scott Craner almost 8 years
      try this =TIME(HOUR(K6),MINUTE(K6),0)= TIME(3,30,0),120)