• 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 quick question

importdistributors

Senior member
Hello, I have a quick question for anyone who has knowledge in excel/vba. I need to make a cells results stay positive or zero, If the cell comes up to be a negative number, I want it to automatically say zero. Thanks in advance.
 
=if(val<0,0,val) should do the trick....
that is, if val <0, then cell = 0; otherwise, it's equal to the value entered.
 
Example:
=MAX(A4,0)

Basically this will display the higher of the two numbers. The number in cell A4 and 0.
 
Nope, you'd have to use either the IF() method or Dave's MAX() method; however, if you're using this for multiple cells, enter the format in the first one and then use fill down, or fill right and it'll automatically adjust the input values for you.
 
Back
Top