IF and TIME, hopefully an easy one

LOH123

New Member
Joined
Dec 18, 2018
Messages
2
Hi All,

Hoping this is easy for all you experts out there.

Im trying to do an IF statement based on a difference in time, I have entered =TEXT(Late time-Early time),"h") so that the time difference is displyed in hours only, hours and minutes is preferable but I can see no way of doing that. However, even with just hours it's not workng as I would hope. My IF statement is looking at that cell for a value over 5 IF(Cell>5,10,5) but even when the cell says 3 it is returning 10. I assume this is because it is time but don't know how to get round it. I have tried IF(Cell>TIME(5,0,0),10,5) but that doesn't work either, can you help?
 

Excel Facts

Quick Sum
Select a range of cells. The total appears in bottom right of Excel screen. Right-click total to add Max, Min, Count, Average.
Text turns your number into text a number 7 does not = a text 7. you can add 0 to turn it back to a number.

Code:
=IF(A10+0>5,10,5)
 
Upvote 0

Forum statistics

Threads
1,214,647
Messages
6,120,722
Members
448,987
Latest member
marion_davis

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