Exceljet

Quick, clean, and to the point

Assign points based on late time

Excel formula: Assign points based on late time
Generic formula 
=
IF(time<VALUE("0:05"),0,
IF(time<VALUE("0:15"),1,
IF(time<VALUE("0:30"),2,
IF(time<VALUE("0:60"),3,
IF(time<VALUE("4:00"),4,
5)))))
Explanation 

To assign penalty points based on an amount of time late, you can use a nested IF formula.

In the example shown, the formula in E5 is:

=
IF(D5<VALUE("0:05"),0,
IF(D5<VALUE("0:15"),1,
IF(D5<VALUE("0:30"),2,
IF(D5<VALUE("0:60"),3,
IF(D5<VALUE("4:00"),4,
5)))))

Note: line breaks added for readability.

How this formula works

This formula is a classic example of a nested IF formula that tests threshold values in ascending order. To match the schedule shown in G4:G10, the formula first checks the late by time in D5 to see if it's less than 5 minutes. If so, zero points are assigned:

IF(D5<VALUE("0:05"),0,

If the result of the logical test above is FALSE, the formula checks to see if D5 is less than the next threshold, which is 15 minutes:

IF(D5<VALUE("0:15"),1,

The same pattern repeats at each threshold. Because the tests are run in order, from smallest to largest, there is no need for more complicated bracketing.

The VALUE function is used to make Excel treat time value at each threshold as a number instead of next.

Author 
Dave Bruns

Excel Formula Training

Formulas are the key to getting things done in Excel. In this accelerated training, you'll learn how to use formulas to manipulate text, work with dates and times, lookup values with VLOOKUP and INDEX & MATCH, count and sum with criteria, dynamically rank values, and create dynamic ranges. You'll also learn how to troubleshoot, trace errors, and fix problems. Instant access. See details here.