Forum Discussion
LifeSupportAlliance
Jul 11, 2021Copper Contributor
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 ...
- Jul 13, 2021I 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.
Twifoo
Jul 11, 2021Silver Contributor
- LifeSupportAllianceJul 12, 2021Copper Contributor
Twifoo Thank you for your input. I assume I replace my current formula with the one you provided. I am learning by the seat of my pants, but I would like to understand what I am doing. Can you break down the formula for me?
- TwifooJul 13, 2021Silver ContributorI 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.