ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   SUMIF Formuale with 2 variables (https://www.excelbanter.com/excel-worksheet-functions/71747-sumif-formuale-2-variables.html)

CiaraG

SUMIF Formuale with 2 variables
 
Good morning all,

I am using the following array formuale in my worksheet to calculate the sum
of a column where one column is equal to a variable and another column is
equal to "CN". My formulae keeps giving me the NUM error. This error
appears even when I use the SUMPRODUCT function. Has anyone any ideas on how
to amend this???

{=SUM(IF((EmployeeData!A:A=B8)*(EmployeeData!L:L=" CN"),EmployeeData!K:K))}

Thanks,

Ciara

daddylonglegs

SUMIF Formuale with 2 variables
 

I'd use SUMPRODUCT but either way you can't use complete column refs
like A:A - switch to A1:A1000 or similar


--
daddylonglegs
------------------------------------------------------------------------
daddylonglegs's Profile: http://www.excelforum.com/member.php...o&userid=30486
View this thread: http://www.excelforum.com/showthread...hreadid=512636


Philip J Smith

SUMIF Formuale with 2 variables
 
Hi Ciara.

Labels at the head of the columns might be the source of the problem.

Try the following syntax.

{=SUM(IF(EmployeeData!A:A=B8,If(EmployeeData!L:L=" CN",EmployeeData!K:K,0),0))}

Regards
Phil

"CiaraG" wrote:

Good morning all,

I am using the following array formuale in my worksheet to calculate the sum
of a column where one column is equal to a variable and another column is
equal to "CN". My formulae keeps giving me the NUM error. This error
appears even when I use the SUMPRODUCT function. Has anyone any ideas on how
to amend this???

{=SUM(IF((EmployeeData!A:A=B8)*(EmployeeData!L:L=" CN"),EmployeeData!K:K))}

Thanks,

Ciara


CiaraG

SUMIF Formuale with 2 variables
 
Thanks. It works perfectly!!!

"daddylonglegs" wrote:


I'd use SUMPRODUCT but either way you can't use complete column refs
like A:A - switch to A1:A1000 or similar


--
daddylonglegs
------------------------------------------------------------------------
daddylonglegs's Profile: http://www.excelforum.com/member.php...o&userid=30486
View this thread: http://www.excelforum.com/showthread...hreadid=512636




All times are GMT +1. The time now is 01:17 PM.

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