Time Issue

mole999

Well-known Member
Joined
Oct 23, 2004
Messages
10,524
Office Version
  1. 2019
  2. 2016
  3. 2013
Platform
  1. Windows
I have what should be a simple problem. I want to hide a time value if it is greater than the returned value (more than 12:00)

E should be the end time, X is the start time, either of which when empty is hidden

For an unknown data entry reason, some E are returning more than 12 hours from =IF(X2="","",IF(E2="","",IF(E2>X2, E2-X2, 1-X2+E2)))

when E contains 15:00 (end) and X contains 18:30 (start) the sum is 3.5 hours too early and shows as 20:30. so I want to hide the result of E2>X2, E2-X2, 1-X2+E2 when it is more than 12 hours. checked and it ISNUMBER(TRUE)

what have I missed
 

Excel Facts

Move date out one month or year
Use =EDATE(A2,1) for one month later. Use EDATE(A2,12) for one year later.
Not sure i understand what you need. Maybe...

Pasta1
ABC
1StartEndResult
215:0018:3003:30
318:3015:00 
415:00 
518:00 
607:0019:30 
707:0019:0012:00
822:0001:2003:20
Plan7
Cell Formulas
RangeFormula
C2:C8C2=IF(OR(A2="",B2=""),"",IF(MOD(B2-A2,1)>TIME(12,0,0),"",MOD(B2-A2,1)))


M.
 
Upvote 0
That dose exactly what i wanted, had looked at MOD but not that way, thank you
 
Upvote 0

Forum statistics

Threads
1,214,833
Messages
6,121,858
Members
449,051
Latest member
excelquestion515

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top