Minimum value if

Generic formula 

{=MIN(IF(range=criteria,values))}

Related formulas 

Maximum value

Minimum value

Maximum value if

Minimum if multiple criteria

Maximum if multiple criteria

Explanation

Excel does not offer a "min if" function, so to get a minimum value based on criteria, you can use the MIN function together with the IF function.

This is an array formula and must be entered with Control + Shift + Enter.

In the example shown, the formula in cell G6 is:

{=MIN(IF(names=F6,times))}

Where names is the named range B6:B17, and times is the named range D6:D17.

How this formula works

The IF function is evaluated first. The logical test names=F6 returns an array of TRUE / FALSE values, where TRUE values correspond to rows where the name matches "Hannah" in F6. The "value if true" for IF is the named range "times", which returns the full set of times. No "value if false" is provided, so the result of IF is an array that contains a time (where the logical test returned TRUE) and FALSE where it didn't.

The MIN function then returns the minimum value in this array. FALSE values are automatically ignored.

With MINIFS

The MINIFS function, introduced in Excel 2016, is designed to calculate minimums based on one or more criteria without the need for an array formula. With MINIFS, the formula in G6 is:

=MINIFS(times,names,F6)

Minimum value if

Generic formula 

{=MIN(IF(range=criteria,values))}

Related formulas 

Maximum value

Minimum value

Maximum value if

Minimum if multiple criteria

Maximum if multiple criteria

Explanation

Excel does not offer a "min if" function, so to get a minimum value based on criteria, you can use the MIN function together with the IF function.

This is an array formula and must be entered with Control + Shift + Enter.

In the example shown, the formula in cell G6 is:

{=MIN(IF(names=F6,times))}

Where names is the named range B6:B17, and times is the named range D6:D17.

How this formula works

The IF function is evaluated first. The logical test names=F6 returns an array of TRUE / FALSE values, where TRUE values correspond to rows where the name matches "Hannah" in F6. The "value if true" for IF is the named range "times", which returns the full set of times. No "value if false" is provided, so the result of IF is an array that contains a time (where the logical test returned TRUE) and FALSE where it didn't.

The MIN function then returns the minimum value in this array. FALSE values are automatically ignored.

With MINIFS

The MINIFS function, introduced in Excel 2016, is designed to calculate minimums based on one or more criteria without the need for an array formula. With MINIFS, the formula in G6 is:

=MINIFS(times,names,F6)