ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Sum Data if Column B = Q (https://www.excelbanter.com/excel-worksheet-functions/256228-sum-data-if-column-b-%3D-q.html)

Seanie

Sum Data if Column B = Q
 
I wish to sum all data in Sheet2 Column J, if the value in Sheet2
Column B = The value in Sheet1 Column A

I've tried =SUMPRODUCT(PC_Month_Locations=A8,PC_Month)

Named Ranges above used instead of absolute references

Dave Peterson

Sum Data if Column B = Q
 
If your ranges are defined correctly:

=sumif(pc_month_locations,a8,pc_month)

If you wanted to use =sumproduct():
=SUMPRODUCT(--(PC_Month_Locations=A8),PC_Month)

Adjust the ranges to match--but you can't use whole columns (except in xl2007+).

=sumproduct() likes to work with numbers. The -- stuff changes trues and falses
to 1's and 0's.

Bob Phillips explains =sumproduct() in much more detail he
http://www.xldynamic.com/source/xld.SUMPRODUCT.html

And J.E. McGimpsey has some notes at:
http://mcgimpsey.com/excel/formulae/doubleneg.html

Seanie wrote:

I wish to sum all data in Sheet2 Column J, if the value in Sheet2
Column B = The value in Sheet1 Column A

I've tried =SUMPRODUCT(PC_Month_Locations=A8,PC_Month)

Named Ranges above used instead of absolute references


--

Dave Peterson

Seanie

Sum Data if Column B = Q
 
Bingo, works great, Thanks



Teethless mama

Sum Data if Column B = Q
 
=SUMIF(PC_Month_Locations,A8,PC_Month)


"Seanie" wrote:

I wish to sum all data in Sheet2 Column J, if the value in Sheet2
Column B = The value in Sheet1 Column A

I've tried =SUMPRODUCT(PC_Month_Locations=A8,PC_Month)

Named Ranges above used instead of absolute references
.



All times are GMT +1. The time now is 06:43 PM.

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