Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 22,906
Default Using the Countif option

=COUNTIF(A1:A100,"a") if nothing else in the cell.

Are these letters part of strings within cells?

A1 = aardvark would have 3 "a"'s but =COUNTIF(A1,"a") would return 0

Try this UDF

Function CountChar(InRange As Range, Letter As String) As Long
Dim rng As Range
For Each rng In InRange
CountChar = CountChar + Len(rng.text) - _
Len(Application.WorksheetFunction.Substitute(UCase (rng.text) _
, UCase(Letter), ""))
Next rng
End Function

=CountChar(A1:A100,"a")


Gord Dibben MS Excel MVP

On Thu, 5 Nov 2009 10:50:01 -0800, mlkkrs
wrote:

I'm attempting to count how many a's, b's, c's, d's, etc are in a column. How
do I get started doing this? Any help is well appreciated.

Thank you


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
Using the Countif, Countifs option for Excel mlkkrs Excel Worksheet Functions 6 November 6th 09 02:50 PM
How do I get started using the Countif, Countifs option with Excel mlkkrs Excel Worksheet Functions 3 November 6th 09 12:36 AM
preserve formatting option in pivot table option dialog box Dave F Excel Discussion (Misc queries) 4 May 8th 08 07:25 PM
keep source formatting is not an option in paste option button Tina Excel Discussion (Misc queries) 0 February 20th 06 09:58 PM
Reformat IF(ISERROR(....) : if 1st option returns empty, look at 2nd option. sonar Excel Worksheet Functions 3 September 12th 05 09:52 PM


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