ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Sum formula (https://www.excelbanter.com/excel-discussion-misc-queries/198188-sum-formula.html)

Jeremy

Sum formula
 
I am looking to sum values if other values equal. The formula needs to be
for sum in C.Please see example. This formula will be for a large range of
data.

a b c
1 10 .50 1.25
2 10 .75 1.25
3 15 .15 .25
4 12 .23 .23
5 15 .1 .25


T. Valko

Sum formula
 
Try this entered in C1 and copied down as needed:

=SUMIF(A$1:A$5,A1,B$1:B$5)

--
Biff
Microsoft Excel MVP


"Jeremy" wrote in message
...
I am looking to sum values if other values equal. The formula needs to be
for sum in C.Please see example. This formula will be for a large range
of
data.

a b c
1 10 .50 1.25
2 10 .75 1.25
3 15 .15 .25
4 12 .23 .23
5 15 .1 .25




Jeremy

Sum formula
 
This works but what if I add one more column where it is placing the sum of C
in D of the same in A and B combined.

a b c d
1 100 10 .50 .50
2 200 10 .75 .75
3 100 15 .15 .25
4 100 12 .23 .23
5 100 15 .1 .25


"T. Valko" wrote:

Try this entered in C1 and copied down as needed:

=SUMIF(A$1:A$5,A1,B$1:B$5)

--
Biff
Microsoft Excel MVP


"Jeremy" wrote in message
...
I am looking to sum values if other values equal. The formula needs to be
for sum in C.Please see example. This formula will be for a large range
of
data.

a b c
1 10 .50 1.25
2 10 .75 1.25
3 15 .15 .25
4 12 .23 .23
5 15 .1 .25





T. Valko

Sum formula
 
Entered in D1 and copied down as needed:

=SUMPRODUCT(--(A$1:A$5=A1),--(B$1:B$5=B1),C$1:C$5)

--
Biff
Microsoft Excel MVP


"Jeremy" wrote in message
...
This works but what if I add one more column where it is placing the sum
of C
in D of the same in A and B combined.

a b c d
1 100 10 .50 .50
2 200 10 .75 .75
3 100 15 .15 .25
4 100 12 .23 .23
5 100 15 .1 .25


"T. Valko" wrote:

Try this entered in C1 and copied down as needed:

=SUMIF(A$1:A$5,A1,B$1:B$5)

--
Biff
Microsoft Excel MVP


"Jeremy" wrote in message
...
I am looking to sum values if other values equal. The formula needs to
be
for sum in C.Please see example. This formula will be for a large
range
of
data.

a b c
1 10 .50 1.25
2 10 .75 1.25
3 15 .15 .25
4 12 .23 .23
5 15 .1 .25







Jeremy

Sum formula
 
Final Step

I have a rather large database with two sheets of data. I want to take sheet
two and put the data in column C to sheet one column C where A and B match on
both sheets.

Sheet One
A B C
1 100 4
2 200 1
3 200 2
4 200 5


Sheet Two
A B C
1 100 4 CAR12
2 100 4 WIL13
3 100 4 CAR14
4 200 1 CAR15
5 200 1 CAR16
6 200 2 CAR17
7 200 5 WIL18

What the result should look like
A B C
1 100 4 CAR12; WIL13; CAR14
2 200 1 CAR15; CAR16
3 200 2 CAR17
4 200 5 WIL18

"T. Valko" wrote:

Entered in D1 and copied down as needed:

=SUMPRODUCT(--(A$1:A$5=A1),--(B$1:B$5=B1),C$1:C$5)

--
Biff
Microsoft Excel MVP


"Jeremy" wrote in message
...
This works but what if I add one more column where it is placing the sum
of C
in D of the same in A and B combined.

a b c d
1 100 10 .50 .50
2 200 10 .75 .75
3 100 15 .15 .25
4 100 12 .23 .23
5 100 15 .1 .25


"T. Valko" wrote:

Try this entered in C1 and copied down as needed:

=SUMIF(A$1:A$5,A1,B$1:B$5)

--
Biff
Microsoft Excel MVP


"Jeremy" wrote in message
...
I am looking to sum values if other values equal. The formula needs to
be
for sum in C.Please see example. This formula will be for a large
range
of
data.

a b c
1 10 .50 1.25
2 10 .75 1.25
3 15 .15 .25
4 12 .23 .23
5 15 .1 .25









All times are GMT +1. The time now is 06:13 AM.

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