Essentially, we want to force negative numbers to zero.

If B5 is less than zero, IF returns zero.

Otherwise, IF returns the original number.

Excel formula: Change negative numbers to positive

Both formulas work fine.

The MAX formula above is just an elegant way to replace the slightly more complex IF formula.

MAX ignores empty cells, the logical values TRUE and FALSE, and text values.

Excel formula: Count cells that contain negative numbers

Excel formula: Cap percentage at specific amount

Excel formula: Convert numbers to 1 or 0

Excel MAX function