How to set "0" if the cell value is negative?
valphi63
Posted messages
8
Status
Membre
-
valphi63 Posted messages 8 Status Membre -
valphi63 Posted messages 8 Status Membre -
You can use the MAX function in your formula to ensure that the cell displays "0" instead of a negative number. For example, if your current formula is `=A1-B1`, you can modify it to `=MAX(0, A1-B1)`. This will return "0" if the result of `A1-B1` is negative.
Here’s what I did:
In cell D21, I put the formula =B19-C19 and according to this formula I have a positive result. Now, I’m trying to create a formula in cell C21 that goes as follows: =C19-B19 and I necessarily get a negative value. However, I would like in my formula whose value is negative to somehow make the value visible in cell C21 as "0".
Thank you for your valuable advice and have a nice day.
in C21