Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 13
Default count if question

The Range(“B3:B13”) contains letters of the alphabet.

In cell B14, I need to check that two cells contain “l” (for late shift) and
two cells contain “e” (for early shift).




  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 102
Default count if question

=COUNTIF("B3:B13", "e") will return the number of cells
that are exactly "e".
=COUNTIF("B3:B13", "e") ditoo for l's
=COUNTIF(B3:B13,"*e*") will return the number of cells
that contain an "e" anywhere (ie it will count "be" or "beep"
as one)
=COUNTIF(B3:B13,"*l*") ditto for l's

If you want just one cell to contain both counts you could
use something like:
=COUNTIF("B3:B13", "e") & ", " & COUNTIF("B3:B13", "l")
which would give "2, 3"
OR
=COUNTIF("B3:B13", "e") & " e's, " & COUNTIF("B3:B13", "l") & " l's"
which would give "2 e's, 3 l's"

Dan E

"DL" wrote in message
...
The Range("B3:B13") contains letters of the alphabet.

In cell B14, I need to check that two cells contain "l" (for late shift)

and
two cells contain "e" (for early shift).






  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 13
Default count if question

Thanks!!



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 130
Default count if question

=COUNTIF(B3:B13,{"e","l"}) array entered into a two-column row, or
=COUNTIF(B3:B13,{"e";"l"}) array entered into a two-row column will
return the number of e's to the first cell, the number of l's to the second.

Alan Beban

DL wrote:
The Range(“B3:B13”) contains letters of the alphabet.

In cell B14, I need to check that two cells contain “l” (for late shift) and
two cells contain “e” (for early shift).





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 question Gerard Sanchez Excel Worksheet Functions 4 August 28th 09 06:13 AM
count question del Excel Discussion (Misc queries) 3 September 11th 08 09:27 PM
Day Count Question [email protected] Excel Discussion (Misc queries) 0 June 21st 07 04:52 PM
Count() question new2XL Excel Discussion (Misc queries) 3 June 7th 06 07:05 PM
To Bob ( count question ) Nigel Excel Discussion (Misc queries) 3 April 28th 05 01:32 PM


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