Adding two columns

HCRSnyder

New Member
Joined
Sep 15, 2006
Messages
9
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

Can you sort left to right?
To sort left-to-right, use the Sort dialog box. Click Options. Choose "Sort left to right"
Could you explain your question a bit more? Excel does subtract two numbers (negative or postive) "correctly"

Gene, "The Mortgage Man", Klein
 
Upvote 0
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.
 
Upvote 0
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.
 
Upvote 0
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
 
Upvote 0

Forum statistics

Threads
1,214,650
Messages
6,120,734
Members
448,987
Latest member
marion_davis

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
Back
Top