Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Ted Metro
 
Posts: n/a
Default sumif 2 text conditions

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   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Dave Peterson
 
Posts: n/a
Default sumif 2 text conditions

=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   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Ron Coderre
 
Posts: n/a
Default sumif 2 text conditions

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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
sumif with multiple conditions Slax Excel Worksheet Functions 5 April 12th 06 10:27 PM
Sumif with 2 conditions Anat Excel Discussion (Misc queries) 4 November 23rd 05 01:09 AM
SUMIF with two conditions? Lee Harris Excel Worksheet Functions 7 November 20th 05 10:47 AM
SUMIF with 2 conditions Simon Excel Worksheet Functions 4 August 26th 05 01:04 PM
Read Text File into Excel Using VBA Willie T Excel Discussion (Misc queries) 13 January 8th 05 12:37 AM


All times are GMT +1. The time now is 02:40 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"