• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

Excel question about negative value

Psyber

Senior member
How do I create a cell where if the value calculated is less than or equal to 0, then it outputs 0. If the value calculated is positive it outputs the postive number. I'm hoping I don't have to use the if, then statement. It gets kinda hairy because of cell references.

Thanks in advance,
Psyber
 
An If-then statement would most certainly do it, but you might could use SIGN function...

Assume you have a value of 10 in cell A1. Using SIGN(A1) will return a value of 1. Changing A1 to equal 0 will return a value of 0, and changing A1 to equal -10 will return a value of -1.

You could just simply multiply the value of A1 and the return to get the positive number. If it's zero, then that would also work as well. Unfortunately, the wrinkle comes in about getting the negative number to also return zero without using an If-then statement.
 
Back
Top