Negative values turn into zero values
Dear Excel Community,
I have following formula: =(60 - x) * y / 100 Sometimes x is higher than 60 and the result is a negative value. In case of a negative value, I would like to have the value 0 in the cell. How do I accomplish this? Thanks for your help! gábor |
Negative values turn into zero values
You can do it like this:
=MAX(0,(60 - x) * y / 100) so if the second term evaluates to less than 0 then 0 will be returned. Hope this helps. Pete "Corcovadocowboy" wrote in message ... Dear Excel Community, I have following formula: =(60 - x) * y / 100 Sometimes x is higher than 60 and the result is a negative value. In case of a negative value, I would like to have the value 0 in the cell. How do I accomplish this? Thanks for your help! gábor |
Negative values turn into zero values
=max(0,(60 - x) * y / 100)
-- Kind regards, Niek Otten Microsoft MVP - Excel "Corcovadocowboy" wrote in message ... | Dear Excel Community, | | I have following formula: | =(60 - x) * y / 100 | | Sometimes x is higher than 60 and the result is a negative value. | | In case of a negative value, I would like to have the value 0 in the cell. | | How do I accomplish this? | | Thanks for your help! | | gábor |
Negative values turn into zero values
=if(x 60,0,(60 - x) * y / 100)
"Corcovadocowboy" wrote: Dear Excel Community, I have following formula: =(60 - x) * y / 100 Sometimes x is higher than 60 and the result is a negative value. In case of a negative value, I would like to have the value 0 in the cell. How do I accomplish this? Thanks for your help! gábor |
Negative values turn into zero values
Thank you all,
your suggestions worked fine. gábor "Niek Otten" wrote: =max(0,(60 - x) * y / 100) -- Kind regards, Niek Otten Microsoft MVP - Excel "Corcovadocowboy" wrote in message ... | Dear Excel Community, | | I have following formula: | =(60 - x) * y / 100 | | Sometimes x is higher than 60 and the result is a negative value. | | In case of a negative value, I would like to have the value 0 in the cell. | | How do I accomplish this? | | Thanks for your help! | | gábor |
All times are GMT +1. The time now is 10:23 AM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com