#1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1
Default Formula

I am trying to input a formula that when I subtract the contents of one cell
from another if the sum is negative, I want a zero to show in the cell. If
the sum of the cell is a positive number then I want the sum to show in the
cell.

This is what I have tried =IF(G4-H4<=0,0). The only problem with it is
every time the sum of the cell comes up positive it gives me a false
statement. If the sum is positive I want to see that sum.
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 4,339
Default Formula

=MAX(0,G4-H4)

"Christine Haines" wrote:

I am trying to input a formula that when I subtract the contents of one cell
from another if the sum is negative, I want a zero to show in the cell. If
the sum of the cell is a positive number then I want the sum to show in the
cell.

This is what I have tried =IF(G4-H4<=0,0). The only problem with it is
every time the sum of the cell comes up positive it gives me a false
statement. If the sum is positive I want to see that sum.

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 22,906
Default Formula

Need another argument to tell Excel what to do if value is not <= 0

=IF(G4-H4<=0,0,G4-H4)

Another method.........=MAX(0,G4-H4)


Gord Dibben MS Excel MVP


On Fri, 29 Sep 2006 11:06:02 -0700, Christine Haines <Christine
wrote:

I am trying to input a formula that when I subtract the contents of one cell
from another if the sum is negative, I want a zero to show in the cell. If
the sum of the cell is a positive number then I want the sum to show in the
cell.

This is what I have tried =IF(G4-H4<=0,0). The only problem with it is
every time the sum of the cell comes up positive it gives me a false
statement. If the sum is positive I want to see that sum.


  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1
Default Formula

It worked! Thank you so much!!!!!

"Gord Dibben" wrote:

Need another argument to tell Excel what to do if value is not <= 0

=IF(G4-H4<=0,0,G4-H4)

Another method.........=MAX(0,G4-H4)


Gord Dibben MS Excel MVP


On Fri, 29 Sep 2006 11:06:02 -0700, Christine Haines <Christine
wrote:

I am trying to input a formula that when I subtract the contents of one cell
from another if the sum is negative, I want a zero to show in the cell. If
the sum of the cell is a positive number then I want the sum to show in the
cell.

This is what I have tried =IF(G4-H4<=0,0). The only problem with it is
every time the sum of the cell comes up positive it gives me a false
statement. If the sum is positive I want to see that sum.



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
Reusing formula Tony29 Excel Discussion (Misc queries) 7 September 7th 06 03:34 AM
2 Nesting questions Starchaser Excel Worksheet Functions 7 January 20th 06 06:53 PM
Match then lookup Tenacity Excel Worksheet Functions 9 December 3rd 05 05:30 AM
Formula Problem - interrupted by #VALUE! in other cells!? Ted Excel Worksheet Functions 17 November 25th 05 05:18 PM
Formula checking multiple worksheets sonic-the-mouse Excel Worksheet Functions 2 June 5th 05 03:28 AM


All times are GMT +1. The time now is 12:08 PM.

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

About Us

"It's about Microsoft Excel"