ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Totaling Cells with Like Information (https://www.excelbanter.com/excel-discussion-misc-queries/234767-totaling-cells-like-information.html)

LaDonna Brooks

Totaling Cells with Like Information
 
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,


--
msladona

JLatham

Totaling Cells with Like Information
 
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.


"LaDonna Brooks" wrote:

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,


--
msladona


JLatham

Totaling Cells with Like Information
 
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.

"JLatham" wrote:

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.


"LaDonna Brooks" wrote:

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,


--
msladona


Jacob Skaria

Totaling Cells with Like Information
 
=SUMIF(A:A,200,B:B)
OR
=SUMIF(A:A,<ReferenceCell,B:B)

If this post helps click Yes
---------------
Jacob Skaria


"LaDonna Brooks" wrote:

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,


--
msladona



All times are GMT +1. The time now is 10:00 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com