Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1
Default How do I count two conditions using a wildcard?

I need to know how to count by two conditions, using a wildcard for
one of those conditions. For instance, each member has a rank and a
unit. I can count multiple conditions without wildcards.

=SUM((C2:C152="E5")*(U2:U152="BN1"))

will tell me how many E5s are in 1st Battalion.

But how many enlisted personnel total are in 1st Battalion? Enlisted
ranks are indicated by E1, E2 and so on, up to E9. I've tried several
formula that replace the "E5" with "E*" or "E?", but none have
worked. Writing 9 different formula for E1 to E9, then totaling those
formula up would work, but is there an easy way to do this?

  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 4,393
Default How do I count two conditions using a wildcard?

You should learn about SUMPRODUCT
http://www.xldynamic.com/source/xld.SUMPRODUCT.html
http://mcgimpsey.com/excel/formulae/doubleneg.html
then come back with question.
Give us more details of how the data is set out.

The asterisk (*) in your formula is not a "wildcard" it is the
multiplication operator.
best wishes
--
Bernard V Liengme
Microsoft Excel MVP
www.stfx.ca/people/bliengme
remove caps from email

"NoNickName" wrote in message
oups.com...
I need to know how to count by two conditions, using a wildcard for
one of those conditions. For instance, each member has a rank and a
unit. I can count multiple conditions without wildcards.

=SUM((C2:C152="E5")*(U2:U152="BN1"))

will tell me how many E5s are in 1st Battalion.

But how many enlisted personnel total are in 1st Battalion? Enlisted
ranks are indicated by E1, E2 and so on, up to E9. I've tried several
formula that replace the "E5" with "E*" or "E?", but none have
worked. Writing 9 different formula for E1 to E9, then totaling those
formula up would work, but is there an easy way to do this?



  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 4,339
Default How do I count two conditions using a wildcard?

=SUMPRODUCT(--(LEFT(C2:154,1)="E")*(U2:U152="BN1"))

"NoNickName" wrote:

I need to know how to count by two conditions, using a wildcard for
one of those conditions. For instance, each member has a rank and a
unit. I can count multiple conditions without wildcards.

=SUM((C2:C152="E5")*(U2:U152="BN1"))

will tell me how many E5s are in 1st Battalion.

But how many enlisted personnel total are in 1st Battalion? Enlisted
ranks are indicated by E1, E2 and so on, up to E9. I've tried several
formula that replace the "E5" with "E*" or "E?", but none have
worked. Writing 9 different formula for E1 to E9, then totaling those
formula up would work, but is there an easy way to do this?


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
COUNT or COUNTIF using wildcard text? WiFiMike2006 Excel Worksheet Functions 11 January 12th 07 11:12 PM
How do I count wildcard text meeting certain criteria in EXCEL? cybermaksim Excel Worksheet Functions 1 February 17th 06 03:03 AM
Count ifs - 2 conditions Nick Excel Discussion (Misc queries) 5 January 12th 06 05:06 PM
Wildcard Usage: I absolutely need this to count?/sum? two or more criteri Inexcelhell Excel Discussion (Misc queries) 2 October 12th 05 03:11 PM
Count with 2 conditions? Lee Excel Worksheet Functions 2 March 19th 05 02:45 AM


All times are GMT +1. The time now is 03:14 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"