If the number in column B is greater than zero, the result should be 1.

If the number in column B is less than or equal to zero, the result should be zero.

With the IF function

One way to handle this problem is with theIF function.

Excel formula: Convert negative numbers to zero

The logical test inside IF can be adjusted to apply different logic if needed.

More than one condition can be tested by nesting IF functions.

The IF…

Boolean algebra in Excel

Excel formula: Change negative numbers to positive

Excel formula: Count cells that contain negative numbers

Excel formula: Cap percentage at specific amount

Excel IF function

Article image