Subtotal of adjacent coloumn

F

Father John

Good morning to all

I have a spreadsheet that is sorted by client name in col. B with charges in
col. C
I want to total these amounts by client in col D. so for example:

Smith has charges in cells c7:c10 - Brown has charges in c11:c13 - Jones
has charges in c14 only

d10 would subtotal charges for Smith, d13 would subtotal charges for Brown,
d14 would subtotal charges for Jones

Many thanks for any assistance
 
D

Don Guillett Excel MVP

Good morning to all

I have a spreadsheet that is sorted by client name in col. B with chargesin
col. C
I want to total these amounts by client in col D. so for example:

Smith has charges in cells c7:c10  - Brown has charges in c11:c13  - Jones
has charges in c14 only

d10 would subtotal charges for Smith, d13 would subtotal charges for Brown,
d14 would subtotal charges for Jones

Many thanks for any assistance

A look in the help index for SUMIF will answer this for you.
 
S

Stephen

I have read through the SUMIF and SUMIFS however with a variable criteria
i.e. I don't know in advance the persons surname in the list, is this the
correct Function to be using?
Again thank you
 
A

alanglloyd

The answer to the problem is :

=SUMIF($A$3:$A$22,IF(A3=A4,"",A3),$B$3:$B$16)

Where $A$3:$A$22 is the whole range of names.
A3 is this name.
A4 is the next name
$B$3:$B$16 is the whole range of figures of which you want to sum
those appropriate to your criteria.

The dollar signs (easily entered with F4) are for static cells. so
that you can easily copy a formula down without the result changing..

The description of SUMIF() is not very clear.

The nub of the solution is to find the last name of a particular run -
ie when this name is not the next name.

These problems are easier to solve in a test spreadsheet with a column
for solving each part of the problem. Then combining them in another
column. The intermediate columns help you to see if you have solved
the problem or have any discrepences - the first & last names of a
run, for example in your case

Alan Lloyd
 
Z

zvkmpw

Good morning to all

I have a spreadsheet that is sorted by client name in col. B with chargesin
col. C
I want to total these amounts by client in col D. so for example:

Smith has charges in cells c7:c10  - Brown has charges in c11:c13  - Jones
has charges in c14 only

d10 would subtotal charges for Smith, d13 would subtotal charges for Brown,
d14 would subtotal charges for Jones

One way to get started is to put this in D1 and copy down:
=IF(B1=B2,"",SUMIF(B:B,B1,C:C))

Modify to suit.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top