Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
In column A I have employee names, in coolumn B I have country names, and in
column C, I have department. I want to do a sumif for example that would count how many people in the United States are in the Sales department. I've tried an array formula something like this, but it's not working, {sum(if(and(b2:b100="United States",c2:c100="Sales"),1,0))} Any ideas? |
#2
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
=sumproduct(--(b2:b100="united states"),--(c2:c100="sales"))
Adjust the ranges to match--but you can't use whole columns. =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 Ted Metro wrote: In column A I have employee names, in coolumn B I have country names, and in column C, I have department. I want to do a sumif for example that would count how many people in the United States are in the Sales department. I've tried an array formula something like this, but it's not working, {sum(if(and(b2:b100="United States",c2:c100="Sales"),1,0))} Any ideas? -- Dave Peterson |
#3
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Try this:
=SUMPRODUCT((b2:b100="United States")*(c2:c100="Sales")) or...this variation: =SUMPRODUCT(--(b2:b100="United States"),--(c2:c100="Sales")) Does that help? *********** Regards, Ron XL2002, WinXP "Ted Metro" wrote: In column A I have employee names, in coolumn B I have country names, and in column C, I have department. I want to do a sumif for example that would count how many people in the United States are in the Sales department. I've tried an array formula something like this, but it's not working, {sum(if(and(b2:b100="United States",c2:c100="Sales"),1,0))} Any ideas? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
sumif with multiple conditions | Excel Worksheet Functions | |||
Sumif with 2 conditions | Excel Discussion (Misc queries) | |||
SUMIF with two conditions? | Excel Worksheet Functions | |||
SUMIF with 2 conditions | Excel Worksheet Functions | |||
Read Text File into Excel Using VBA | Excel Discussion (Misc queries) |