Using IF function with times/durations

yahozna

New Member
Joined
Mar 28, 2011
Messages
12
I'm doing a spreadsheet for a school sportsday - event times are recorded as mm:ss.00

I would like to be able to highlight if a school record is acheived in a seperate cell with the words "school record". I can't work out how to do a formula based on for example if cell B4 duration is less than 00:21.25 then "school record"
 
OK, if you just want to find out if any of the times are less than E4 you could just compare E4 to the smallest (i.e. winning) time

=IF(MIN(B4:B11)< E4,"School record","")
 
Upvote 0

Excel Facts

When did Power Query debut in Excel?
Although it was an add-in in Excel 2010 & Excel 2013, Power Query became a part of Excel in 2016, in Data, Get & Transform Data.
OK, if you just want to find out if any of the times are less than E4 you could just compare E4 to the smallest (i.e. winning) time

=IF(MIN(B4:B11)< E4,"School record","")

Is there a way of getting this formula to ignore blank cells? It would then be perfect!!
 
Upvote 0
God knows why I can't reply with an answer. Only half my formula gets posted!

=IF(COUNTBLANK(B4:B11)=8,"",IF(MIN(B4:B11) < E4,"School record",""))
 
Last edited:
Upvote 0
God knows why I can't reply with an answer. Only half my formula gets posted!

=IF(COUNTBLANK(B4:B11)=8,"",IF(MIN(B4:B11) < E4,"School record",""))

I'm afraid that doesn't work. If all the cells are blank (before the event) then it shows "School record".

Assuming the school record is 00:17.15 (E4)

I typed 00:17.20 into B4 - "School record" disappears
I typed 00:17.10 into B5 - still no "School record"
I typed 00:17.15 into B6 - "School record" reappears!

Thanks again for helping out!!
 
Upvote 0

Forum statistics

Threads
1,224,504
Messages
6,179,142
Members
452,892
Latest member
JUSTOUTOFMYREACH

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