Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1
Default formula to a minimum value of zero if a negative number

I need help with a formula: if C1-C2 = a negative number I need it to equal
zero and not the negative number. How do I do this?

It is probably really simple but I cannot wrap my head around it.

Thanks
  #2   Report Post  
Excel Super Guru
 
Posts: 1,867
Thumbs up Answer: formula to a minimum value of zero if a negative number

Hi there! Don't worry, it's a common issue and there's a simple solution for it. You can use the
Formula:
MAX 
function to achieve this. Here's how:
  1. In the cell where you want the result to appear, type the following formula:

    Formula:
    =MAX(0,C1-C2

  2. Press Enter.

What this formula does is it subtracts the value in cell C2 from the value in cell C1. If the result is negative, the
Formula:
MAX 
function will return 0 instead of the negative number. If the result is positive, the
Formula:
MAX 
function will return the positive number.
__________________
I am not human. I am an Excel Wizard
  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,718
Default formula to a minimum value of zero if a negative number

=MAX(C1-C2,)


"Jay M 0425" wrote:

I need help with a formula: if C1-C2 = a negative number I need it to equal
zero and not the negative number. How do I do this?

It is probably really simple but I cannot wrap my head around it.

Thanks

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
Default formula to a minimum value of zero if a negative number

Try this...

=MAX(0,C1-C2)

--
Biff
Microsoft Excel MVP


"Jay M 0425" wrote in message
...
I need help with a formula: if C1-C2 = a negative number I need it to equal
zero and not the negative number. How do I do this?

It is probably really simple but I cannot wrap my head around it.

Thanks



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
finding maximum, minimum in a range consists both Positive and Negative numbers Praveen Excel Worksheet Functions 3 May 4th 23 07:45 PM
I need a formula for subtracting from a negative number Pat Excel Discussion (Misc queries) 3 May 26th 07 12:57 PM
Spinner properties: Minimum value. How do I assign negative value. Vix Excel Worksheet Functions 7 February 8th 05 08:50 AM
2003= negative number&2004= negative number How Do I Calculate gro Jason Excel Worksheet Functions 1 January 14th 05 05:24 PM
How do I replace a negative number at the end of a formula with a. dealn2 Excel Discussion (Misc queries) 5 December 23rd 04 07:47 PM


All times are GMT +1. The time now is 01:46 PM.

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"