IF function to search if cell (in time format) is less than 20 minutes

andyj2179

New Member
Joined
Jul 4, 2012
Messages
7
Hi everyone :)

I need to know how I can create an IF function where it will look at a cell with a time in it (e.g. 00:01:24) and determine if it is less than 20 minutes.

If it is I simply want a 1 to display in my target cell otherwise to remain blank.

Please can someone help me? I know how to do it with normal numbers but with a time format it is confusing me!! arrrgh

Many thanks!
 

Excel Facts

Format cells as date
Select range and press Ctrl+Shift+3 to format cells as date. (Shift 3 is the # sign which sort of looks like a small calendar).
Hi everyone :)

I need to know how I can create an IF function where it will look at a cell with a time in it (e.g. 00:01:24) and determine if it is less than 20 minutes.

If it is I simply want a 1 to display in my target cell otherwise to remain blank.

Please can someone help me? I know how to do it with normal numbers but with a time format it is confusing me!! arrrgh

Many thanks!
Try this...

=IF(COUNT(A2),IF(A2 < TIME(0,20,0),1,""),"")<TIME(0,20,0),1,""),"")< html>
 
Upvote 0
Lovely thanks!

What does the COUNT function do? (sorry I am an Excel novice :(
COUNT is just making sure there is a time value entered in the cell. An empty cell will evaluate as 0 and 0 is less than 20 mins so an empty cell could give you an incorrect result.
 
Upvote 0
Or =IF((A1>0)*(A1<0.0138888888888889),1,"")
 
Upvote 0

Forum statistics

Threads
1,203,070
Messages
6,053,368
Members
444,658
Latest member
lhollingsworth

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