To calculate gas (MPG) based on odometer readings you can build a table with a few simple formulas. In the example shown, the formulas in E5 and F5 are:
=[@Mileage]-SUM(C4) // E5 calculate mileage
=[@Distance]/[@...

To get the next scheduled event from a list of events with dates, you can use an array formula based on the MIN and TODAY functions to find the next date, and INDEX and MATCH to display the event on that date. In the...

You can get the last column in a range with a formula based on the COLUMN function.
In the example shown, the formula in cell F5 is:
=MIN(COLUMN(data))+COLUMNS(data)-1
where data is a named range for B5:D10
How...

To calculate the max or min change in a set of data as shown, without using a helper column, you can use an array formula. In the example, the formula in G6 is:
{=MAX(C5:C12-D5:D12)}
Note: this is an array formula...

To find the lowest tide on a Monday, given a set of data with many days of high and low tides, you can use an array formula based on the IF and MIN functions. In the example shown, the formula in I6 is:
{=MIN(IF(day=...

To get the minimum value from a set of numbers, use the MIN function.
In the example shown, the formula in cell I6 is:
=MIN(C6:G6)
The MIN function is fully automatic. It accepts one or more arguments, which can be...

To cap the result of a percentage-based calculation at a a specific amount, you can use the MIN function. In the example shown, the formula in D6 is:
=MIN(C6*10%,1000)
which ensures the result will never be greater...

To find the closest match with a lookup value and numeric data, you can use an array formula based the INDEX, MATCH, ABS and MIN functions. In the example shown, the formula in E5 is:
{=INDEX(data,MATCH(MIN(ABS(data-...

You can get the first row (i.e. the starting row number) in a range with a formula based on the ROW function.
In the example shown, the formula in cell F5 is:
=MIN(ROW(data))
where data is a named range for B5:D10...

To get the position of the nth match (for example, the 2nd matching value, the 3rd matching value, etc.), you can use a formula based on the SMALL function. In the example shown, the formula in G5 is:
=SMALL(IF(list=...

To calculate overtime and pay associated with overtime, you can use the formulas explained on this page. In formula in cell I5 is:
=(F5*H5)+(G5*H5*1.5)
How this formula works
Note: it's important to understand that...

To separate text and numbers, you can use a formula based on the FIND function, the MIN function, and the LEN function with the LEFT or RIGHT function, depending on whether you want to extract the text or the number. In...

To cap a calculated percentage at 100%, you can use the MIN function. In the example shown, the formula in D6 is:
=MIN(1,B5/C5)
which guarantees the result will never exceed 100%.
How this formula works
This...

To get a minimum value based on criteria, you can use the MIN function together with the IF function. In the example shown, the formula in G6 is:
{=MIN(IF(names=F6,times))}
Where "names" is the named range B6:B17,...

To calculate the total number of hours between a start and end time that overlap a period of interest with a given start and end time, you can use a formula based on the IF, MAX, and MIN functions. In the example...