Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Bob Bob is offline
external usenet poster
 
Posts: 972
Default COUNT and IF Array

For every occurrence of a string in B9 in the current worksheet, I want to
count the number of cells that contain the letter W in Lineup Worksheet
F2:F83, where the string in Lineup Worksheet B2:B83 matches the string in B9.

I have tried using this formula but it counts all of the values in F2:F83; I
only want a count of those contaiing W.

=COUNT(IF($B9='Lineup Worksheet'!$B$2:$B$83,IF('Lineup
Worksheet'!$F$2:$F$83="W",0,0)))

Thanks,
Bob

  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8,856
Default COUNT and IF Array

Try this:

=COUNTIF(Lineup!B$2:B$83,B9)

Hope this helps.

Pete

On Dec 1, 8:15 pm, bob wrote:
For every occurrence of a string in B9 in the current worksheet, I want to
count the number of cells that contain the letter W in Lineup Worksheet
F2:F83, where the string in Lineup Worksheet B2:B83 matches the string in B9.

I have tried using this formula but it counts all of the values in F2:F83; I
only want a count of those contaiing W.

=COUNT(IF($B9='Lineup Worksheet'!$B$2:$B$83,IF('Lineup
Worksheet'!$F$2:$F$83="W",0,0)))

Thanks,
Bob


  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,718
Default COUNT and IF Array

=SUMPRODUCT(--($B9='Lineup Worksheet'!$B$2:$B$83),--('Lineup
Worksheet'!$F$2:$F$83="W"))


"bob" wrote:

For every occurrence of a string in B9 in the current worksheet, I want to
count the number of cells that contain the letter W in Lineup Worksheet
F2:F83, where the string in Lineup Worksheet B2:B83 matches the string in B9.

I have tried using this formula but it counts all of the values in F2:F83; I
only want a count of those contaiing W.

=COUNT(IF($B9='Lineup Worksheet'!$B$2:$B$83,IF('Lineup
Worksheet'!$F$2:$F$83="W",0,0)))

Thanks,
Bob

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 287
Default COUNT and IF Array

Hello bob,

personally I'd use SUMPRODUCT as Teethless mama suggests but the reason your
formula doesn't work is that your second if returns 0 whether TRUE or FALSE -
change to:

=COUNT(IF($B9='Lineup Worksheet'!$B$2:$B$83,IF('Lineup
Worksheet'!$F$2:$F$83="W",1)))

confirmed with CTRL+SHIFT+ENTER



"bob" wrote:

For every occurrence of a string in B9 in the current worksheet, I want to
count the number of cells that contain the letter W in Lineup Worksheet
F2:F83, where the string in Lineup Worksheet B2:B83 matches the string in B9.

I have tried using this formula but it counts all of the values in F2:F83; I
only want a count of those contaiing W.

=COUNT(IF($B9='Lineup Worksheet'!$B$2:$B$83,IF('Lineup
Worksheet'!$F$2:$F$83="W",0,0)))

Thanks,
Bob

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 & Array Function Scott Halper Excel Worksheet Functions 4 March 23rd 07 05:27 PM
Inconsistent Array Count results Suzanne Excel Worksheet Functions 5 April 6th 06 05:02 PM
Count If Array Formula carl Excel Worksheet Functions 2 November 21st 05 08:52 PM
Count if array contains cells of a certain value Melissa Excel Worksheet Functions 2 July 29th 05 02:37 AM
How can you use count with an array formula similar to using sum PhilH Excel Worksheet Functions 3 June 27th 05 08:00 AM


All times are GMT +1. The time now is 05:13 PM.

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"