Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Below is the data:

A          B          C
xxx        2          5
xxx        3          4
bbb        2          3
bbb        2.5        2
nnn        1.5        2
nnn        2          1

I want to subtract the amount in column B & C with the same description in column A

share|improve this question
    
Subtract from what? –  Shevek Jun 28 '10 at 8:17
3  
Please show us the results you want using the data you have provided. That will help us to understand your question. Thanks. –  Mike Fitzpatrick Jun 28 '10 at 8:37
add comment

3 Answers

If you actually mean add columns B & C where column A is the same then what you want is a Pivot Table

share|improve this answer
add comment

If think what you are looking for is to use sumif(). For example if you use

=SUMIF(A1:A6,"nnn",B1:B6)

You will get a value of 3.5. If you then do

=SUMIF(A1:A6,"nnn",C1:C6)

You will get a value of 3. Take one away from another and you get 0.5. Does this suffice or are you looking for something more sophisticated?

share|improve this answer
add comment

You can create a pivot table as Shevek says and then create a calculated field to do the subtraction and it should be automatically added to the pivot. You could also just add another column that did the subtraction and add that to the pivot.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.