Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 9
Default 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
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 8,856
Default 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



  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3,440
Default 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


  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 9,101
Default 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

  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 9
Default 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



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How do I turn off Static values DCLBaker Excel Discussion (Misc queries) 0 February 13th 08 04:07 PM
how to turn positive to negative values in excel Paula1 Excel Worksheet Functions 4 February 23rd 06 10:54 PM
how do i sum up a column of time values but ignore negative values Croll New Users to Excel 1 October 11th 05 05:55 PM
Formula to make Negative Values Positive & Positive Values Negative? mustard Excel Discussion (Misc queries) 4 September 26th 05 10:05 PM
... Count, <<< Positive Values minus Negative Values >>> ... Dr. Darrell Excel Worksheet Functions 4 September 8th 05 01:36 PM


All times are GMT +1. The time now is 10:15 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"