Syntax

chaus

New Member
Joined
Apr 8, 2009
Messages
2
This is my first post, please forgive my limited knowledge.
I want to create a formula that:
IF(A1+A2)<=0 à enter 0 in B2
IF(A1+A2)>=1 à enter the sum in B2
I tried: =IF((A1+A2)<=0,0,1) (This was as far as I could get with Excel 2007 Help and my limited knowledge)
It produces the correct result for <=0 but when the sum is >=1 it only produces 1.
Thanks in advance,
Chaus
 

Some videos you may like

Excel Facts

How to total the visible cells?
From the first blank cell below a filtered data set, press Alt+=. Instead of SUM, you will get SUBTOTAL(9,)

Colin Legg

MrExcel MVP
Joined
Feb 28, 2008
Messages
3,497
Office Version
  1. 365
  2. 2016
Platform
  1. Windows
Hi Chaus,

What do you want to happen if A1+A2 is in between 0 and 1?

I think you might be looking for this:

=MAX(0,A1+A2)
 

dave3009

Well-known Member
Joined
Jun 23, 2006
Messages
7,002
Office Version
  1. 365
  2. 2016
Hi chaus

Welcome to the Board

=IF((A1+A2)<=0, 0, A1+A2)

I wasn't sure what you wanted doing when the value was between 0 and 1 so this just provides and answer around the sum being higher or lower than 0

HTH


Dave
 

chaus

New Member
Joined
Apr 8, 2009
Messages
2
Thank you, dialup, Colin L, and dave3009. All of your suggestions worked. Also, your assumptions were correct.<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:eek:ffice:eek:ffice" /><o:p></o:p>
I was looking for 0 if the sum was <0<o:p></o:p>
I was looking for the actual sum if >0<o:p></o:p>
<o:p></o:p>
Thanks again,<o:p></o:p>
Chaus<o:p></o:p>
 

Watch MrExcel Video

Forum statistics

Threads
1,127,516
Messages
5,625,264
Members
416,086
Latest member
CaptainGD

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Top