# Formula in Excel

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

-
Subtract from what? – Shevek Jun 28 '10 at 8:17
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

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.

-

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?

-

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

-