Forum Discussion

LifeSupportAlliance's avatar
LifeSupportAlliance
Copper Contributor
Jul 11, 2021
Solved

blocking negative numbers

I am operating on a desktop with windows 10 pro and office 365 business premium. I have created a simple excel spreadsheet forgas mileage calculations.  In column B there are an ascending succession ...
  • Twifoo's avatar
    Twifoo
    Jul 13, 2021
    I assume your Column headers are in Row 1. The N function ensures that the cell directly above the current Row in Column B is converted to a number. In this case, if the header for Column B is in B1, and it is text, N converts it to 0.

    The MAX function ensures that the difference that results, when B1 is subtracted from B2, will never be a negative number and the lowest it can be will be 0. Stated differently, MAX returns the maximum number between the difference (whether positive or negative) and 0.

Resources