summing column c based an column a criteria

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have extracted reports where oil well numbers are in column A and a related
expense is in column C. I'm looking for a function to that will give me
total expenses per well number.

I've sorted the spreadsheet by well number and then put sum formulas that
add all the column c expenses for a given well number out to the side, but
this is very tedious with over 100 well numbers.

Is there an easier way?
 
Assuming you have a list of well numbers (say in column D):


in E1:

=SUMIF(A:A,D1,C:C) where D1 contains the well number

Copy down
 
With the data sorted you should choose Data | Subtotals, specifying
For Each Change in column A and choose SUM on Column C.

After Excel has calculated this, it will have inserted a new row after
each Well Number with a subtotal of column C for that Well.

Hope this helps.

Pete
 
Back
Top