Conditional Addition

B

Brian

Howdy All,

Here is what I have:

Box inventory worksheet:

Column A = Box number
Column B = Box inventory description
Column C = Quantity of Column B

I want to find the total quantity for each box (regardless of Column B)

Example:

A1=1, B1=[description], C1=3499
A2=1, B2=[description], C2=1238
A3=2, B3=[description], C3=382
A4=2, B4=[description], C4=4322
A5=3, B5=[description], C4=3882


Total quantity of Box 1 = 3499+1238
Total quantity of Box 2 = 1238+382
Etc.

Any ideas?
 
P

Pete_UK

Try this:

=SUMIF(A1:A5,E1,C1:C5)

where E1 is a cell where you can enter the box number - 1 or 2 or 3
etc.

Hope this helps.

Pete
 
A

Allllen

A couple of ways you might like.

A - WITH SUBTOTALS
1) sort by column A ascending
2) data > subtotals. At each change in column A, use function SUM, add to
column C.
3) You will now have a subtotalled list and you can go to the 2nd group
level on the left and see the totals for each group.

B - SIMPLE SUMIF

use this formula in a cell somewhere:

=SUMIF(A1:A5,1,C1:C5)
The 1 is the box number you are trying to get. Change that to 2 if you
want, or use a cell reference, where the cell has got the number of the box
in it. If you have more columns, then use A1:A197 and C1:C197, for example.
 
T

Toppers

=SUMPRODUCT(--(A2:A100=<boxnumber>),(C2:C100))

Substitute <boxnunber> for a cell containing box number

HTH
 
B

Bernard Liengme

To sum all the C values for which A =1 use =SUMIF(A1:A100,1,C1:C100)

Or make a Pivot Table

best wishes
 

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