ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   DSUM (https://www.excelbanter.com/excel-worksheet-functions/139278-dsum.html)

ED007

DSUM
 
I have a table with 4 columns.
DATE, MOLD, SOURCE, PARTS

(DATE IS A DATE, MOLD AND SOURCE ARE TEXT, AND PARTS IS NUMERIC)

I have a second table that contains.
DATE, MOLD, SOURCE2, GROSS

(DATE IS A DATE, MOLD AND SOURCE2 ARE TEXT, AND GROSS IS NUMERIC)

What I want is a function that I can place in the 5 colum of the second
table that would sum all the values in the parts column of the first table
were the DATE and MOLD match the DATE and MOLD on the corrisponding row of
the second table.

I thought I could get there with DSUM but I am having no luck.

[email protected]

DSUM
 
Try this :

supose first table is in A8:D11 and second table is in F8:J11

in J8 put the formula :

=SUM(IF(($A$8:$A$11=F8)*($B$8:$B$11=G8);$D$8:$D$11 ;""))


This is a array formula you must enter it with Ctrl Shift Enter

Regards,


Carlos


William Horton

DSUM
 
Assuming that table 1 is in Sheet1!$A$2:$A$12 and table 2 is in
Sheet2!$A$2:$A$12.

Try:
=SUMPRODUCT(--(A2=Sheet1!$A$2:$A$12),--(B2=Sheet1!$B$2:$B$12),Sheet1!$D$2:$D$12)

Or if the row # has to be the same as the other tables row # try:
=SUMPRODUCT(--(A2=Sheet1!$A$2:$A$12),--(B2=Sheet1!$B$2:$B$12),--(ROW()=ROW(Sheet1!$B$2:$B$12)),Sheet1!$D$2:$D$12)

Copy the formula down in the 5th column of table 2.

Hope this helps.

Bill Horton

"ED007" wrote:

I have a table with 4 columns.
DATE, MOLD, SOURCE, PARTS

(DATE IS A DATE, MOLD AND SOURCE ARE TEXT, AND PARTS IS NUMERIC)

I have a second table that contains.
DATE, MOLD, SOURCE2, GROSS

(DATE IS A DATE, MOLD AND SOURCE2 ARE TEXT, AND GROSS IS NUMERIC)

What I want is a function that I can place in the 5 colum of the second
table that would sum all the values in the parts column of the first table
were the DATE and MOLD match the DATE and MOLD on the corrisponding row of
the second table.

I thought I could get there with DSUM but I am having no luck.



All times are GMT +1. The time now is 11:48 PM.

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