Totaling Cells with Like Information

  • Thread starter Thread starter LaDonna Brooks
  • Start date Start date
L

LaDonna Brooks

Is there a formula where you could do the following:

1A 200, 1B 25,000

2A 201, 2B 30,000

3A 202, 3B 10,000

4A 200, 4B 15,000

5A 201, 5B 5,000

6A 200, 5B 12,000

Can you have it total everything in Cell A with like codes? Is there a way
if the codes are the same in CellA – could it add 1A (25,000), 4A (15,000),
6A (12,000)? Thanks,
 
Actually, it looks like there is, but I'm not sure what is in your cells. If
the worksheet is laid out like this
A B
1 200 25000
2 201 30000
3 202 10000
4 200 15000
5 201 5000
6 200 12000

Then a formula like =SUMIF(A1:A6,"=200",B1:B6) should work.
 
I should have taken my response one step further. With the previous formula
you constantly have to change the ,"=200", portion of it to set up to get
totals for other values in column A such as 201 or 202.

If you choose a cell to be available for user entry of one of those codes
(for this we will say that it is cell C1. Then you can modify the formula to
=SUMIF(A1:A6,"=" & C1,B1:B6)
then just type the code (200, 201, 202, etc) that you need totals for into
C1 and you'll get it without having to constantly modify the formula.

Hope this helps.
 
=SUMIF(A:A,200,B:B)
OR
=SUMIF(A:A,<ReferenceCell>,B:B)

If this post helps click Yes
 

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

Back
Top