HCRSnyder

New Member
I have 2 columns that must be added. in some instances there are two negative values in both columns in others a positive and a negative. How do I get the columns to add correctly and display a negative value, if for example two negatives are being added.

Excel Facts

To shade all formula cells: Home, Find & Select, Formulas to select all formulas. Then apply a light fill color.
Oops -- wrote it wrong -- two columns that must be subtracted from one another

Hello

isn't it just =A1-B1

Could you explain your question a bit more? Excel does subtract two numbers (negative or postive) "correctly"

Gene, "The Mortgage Man", Klein

I have 2 columns that must be added. in some instances there are two negative values in both columns in others a positive and a negative. How do I get the columns to add correctly and display a negative value, if for example two negatives are being added.

Oops -- wrote it wrong -- two columns that must be subtracted from one another

I find this to be somewhat confusing. Could you provide some examples of the entries and your desired results. Perhaps others can understand this.

Hey -- I figured it out. Since I have negative and positive numbers in any sort of combination in a column, I used this
=IF(AND(A2>0,B2>0),A2-B2,A2+B2)

That ensures that whether I subtract a negative from a negative or a positive from a negative or a negative from a positive, I get the correct value (Pos or Neg) in the answer field.

Maybe this will help others. Actually one of the IT people popped by my desk and helped me out.

Hey -- I figured it out. Since I have negative and positive numbers in any sort of combination in a column, I used this
=IF(AND(A2>0,B2>0),A2-B2,A2+B2)

That ensures that whether I subtract a negative from a negative or a positive from a negative or a negative from a positive, I get the correct value (Pos or Neg) in the answer field.

Maybe this will help others. Actually one of the IT people popped by my desk and helped me out.

Your formula is wrong. It will only hurt others. If, for example, you put
-5 in a2 and -1 in b2, then your formula gets -6 when it should get -4.

simply a2-b2 is correct and all you need.

Gene, "The Mortgage Man", Klein

Replies
3
Views
148
Replies
1
Views
279
Replies
9
Views
153
Replies
8
Views
230
Replies
0
Views
942

1,203,524
Messages
6,055,910
Members
444,832
Latest member
bgunnett8

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.

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

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