Negative values turn into zero values

  • Thread starter Corcovadocowboy
  • Start date
C

Corcovadocowboy

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
 
P

Pete_UK

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
 
N

Niek Otten

=max(0,(60 - x) * y / 100)

--
Kind regards,

Niek Otten
Microsoft MVP - Excel


| 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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top