Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Using the Countif, Countifs option for Excel | Excel Worksheet Functions | |||
How do I get started using the Countif, Countifs option with Excel | Excel Worksheet Functions | |||
preserve formatting option in pivot table option dialog box | Excel Discussion (Misc queries) | |||
keep source formatting is not an option in paste option button | Excel Discussion (Misc queries) | |||
Reformat IF(ISERROR(....) : if 1st option returns empty, look at 2nd option. | Excel Worksheet Functions |