Excel - negative result equals to zero

Issue

My problem is relatively simple,
I wish that when the result of subtraction is negative (eg 0-2 =- 2), it appears to be zero?
Thank you for your help.

Solution

Look at this formula that references cell A1 and B1 = 0 = 2

= IF(A1-B1<0;0;A1-B1)

Note

Thanks to mike-31 for this tip.

Ask a question
CCM is a leading international tech website. Our content is written in collaboration with IT experts, under the direction of Jean-François Pillou, founder of CCM.net. CCM reaches more than 50 million unique visitors per month and is available in 11 languages.
This document, titled « Excel - negative result equals to zero », is available under the Creative Commons license. Any copy, reuse, or modification of the content should be sufficiently credited to CCM (ccm.net).