COUNT unique letter in a column

Howdy All,

I want to count the number of occurrences of a partipular letter in a column

Any help?

THanks,
Brian 


0
Brian
5/8/2010 3:38:58 PM
excel.worksheet.functions 4936 articles. 2 followers. Follow

6 Replies
739 Views

Similar Articles

[PageSpeed] 59

This will give you the number of lower case a's in a range:
=SUMPRODUCT(LEN(A1:A100)-LEN(SUBSTITUTE(A1:A100,"a","")))/len("a")

If you want to ignore case, you can use:
=SUMPRODUCT(LEN(A1:A100)
   -LEN(SUBSTITUTE(upper(A1:A100),upper("a"),"")))/len("a")

(Substitute is case-sensitive)

Adjust the ranges to match--but you can't use whole columns (except in xl2007+).




Brian wrote:

> Howdy All,
> 
> I want to count the number of occurrences of a partipular letter in a column
> 
> Any help?
> 
> THanks,
> Brian 
> 
> 

-- 

Dave Peterson
0
Dave
5/8/2010 3:52:58 PM
In case Dave has misread your question and the cells have only one letter 
each:
=COUNTIF(A1A:100,"A")
best wishes
-- 
Bernard Liengme
Microsoft Excel MVP
http://people.stfx.ca/bliengme

"Brian" <wolfmanx@charter.net> wrote in message 
news:eJhbWSs7KHA.4508@TK2MSFTNGP06.phx.gbl...
> Howdy All,
>
> I want to count the number of occurrences of a partipular letter in a 
> column
>
> Any help?
>
> THanks,
> Brian
> 
0
Bernard
5/8/2010 5:33:42 PM
Thanks for the input.
The column may actually contain any number of letters. Examples B1 = pme, B2 
= e, B3 = pe, etc.
I want to have a few cells that count the p's, m's and e's.

Thanks again,
Brian

"Dave Peterson" <petersod@verizonXSPAM.net> wrote in message 
news:%23tBuKas7KHA.1316@TK2MSFTNGP02.phx.gbl...
> This will give you the number of lower case a's in a range:
> =SUMPRODUCT(LEN(A1:A100)-LEN(SUBSTITUTE(A1:A100,"a","")))/len("a")
>
> If you want to ignore case, you can use:
> =SUMPRODUCT(LEN(A1:A100)
>   -LEN(SUBSTITUTE(upper(A1:A100),upper("a"),"")))/len("a")
>
> (Substitute is case-sensitive)
>
> Adjust the ranges to match--but you can't use whole columns (except in 
> xl2007+).
>
>
>
>
> Brian wrote:
>
>> Howdy All,
>>
>> I want to count the number of occurrences of a partipular letter in a 
>> column
>>
>> Any help?
>>
>> THanks,
>> Brian
>
> -- 
>
> Dave Peterson 


0
Brian
5/8/2010 5:48:41 PM
Your use of the word "unique" may be a little confusing. From what I can 
see, you want to count the cells with a particular letter in it, even if 
that letter is combined with other letters. Also from your *small* example 
pool, it appears that the letter won't be repeated within any single cell. 
If that is the case... or, if it does repeat in a cell, but you only want to 
count that cell once, give this formula a try...

=COUNTIF(A1:A100,"*p*")

Adjust the range accordingly and change the letter as needed.

-- 
Rick (MVP - Excel)



"Brian" <wolfmanx@charter.net> wrote in message 
news:uTh51at7KHA.3964@TK2MSFTNGP05.phx.gbl...
> Thanks for the input.
> The column may actually contain any number of letters. Examples B1 = pme, 
> B2 = e, B3 = pe, etc.
> I want to have a few cells that count the p's, m's and e's.
>
> Thanks again,
> Brian
>
> "Dave Peterson" <petersod@verizonXSPAM.net> wrote in message 
> news:%23tBuKas7KHA.1316@TK2MSFTNGP02.phx.gbl...
>> This will give you the number of lower case a's in a range:
>> =SUMPRODUCT(LEN(A1:A100)-LEN(SUBSTITUTE(A1:A100,"a","")))/len("a")
>>
>> If you want to ignore case, you can use:
>> =SUMPRODUCT(LEN(A1:A100)
>>   -LEN(SUBSTITUTE(upper(A1:A100),upper("a"),"")))/len("a")
>>
>> (Substitute is case-sensitive)
>>
>> Adjust the ranges to match--but you can't use whole columns (except in 
>> xl2007+).
>>
>>
>>
>>
>> Brian wrote:
>>
>>> Howdy All,
>>>
>>> I want to count the number of occurrences of a partipular letter in a 
>>> column
>>>
>>> Any help?
>>>
>>> THanks,
>>> Brian
>>
>> -- 
>>
>> Dave Peterson
>
> 
0
Rick
5/8/2010 6:49:58 PM
If B1:B2 contained:

ppmmee
ppmmee

Would the count of p's be two?  If yes, use Rick's suggestion.  His suggestion 
counts the number of cells with at least one p:
=countif(b:b,"*p*")

If the the count would be 0 (since there is no exact match), then use Bernard's 
suggestion.  His suggestion looks for a single character in the cell:
=countif(b:b,"p")

If the count would be 4 (two in B1 + two in B2), then use one of the suggestions 
I gave.  It counts the number of times that character appears in the range.




Brian wrote:

> Thanks for the input.
> The column may actually contain any number of letters. Examples B1 = pme, B2 
> = e, B3 = pe, etc.
> I want to have a few cells that count the p's, m's and e's.
> 
> Thanks again,
> Brian
> 
> "Dave Peterson" <petersod@verizonXSPAM.net> wrote in message 
> news:%23tBuKas7KHA.1316@TK2MSFTNGP02.phx.gbl...
> 
>>This will give you the number of lower case a's in a range:
>>=SUMPRODUCT(LEN(A1:A100)-LEN(SUBSTITUTE(A1:A100,"a","")))/len("a")
>>
>>If you want to ignore case, you can use:
>>=SUMPRODUCT(LEN(A1:A100)
>>  -LEN(SUBSTITUTE(upper(A1:A100),upper("a"),"")))/len("a")
>>
>>(Substitute is case-sensitive)
>>
>>Adjust the ranges to match--but you can't use whole columns (except in 
>>xl2007+).
>>
>>
>>
>>
>>Brian wrote:
>>
>>
>>>Howdy All,
>>>
>>>I want to count the number of occurrences of a partipular letter in a 
>>>column
>>>
>>>Any help?
>>>
>>>THanks,
>>>Brian
>>
>>-- 
>>
>>Dave Peterson 
> 
> 
> 

-- 

Dave Peterson
0
Dave
5/8/2010 7:43:54 PM
Thanks Rick.
You read my mind, the letters will only appear in a given cell once.

Brian
"Rick Rothstein" <rick.newsNO.SPAM@NO.SPAMverizon.net> wrote in message 
news:O%23L3r9t7KHA.3964@TK2MSFTNGP05.phx.gbl...
> Your use of the word "unique" may be a little confusing. From what I can 
> see, you want to count the cells with a particular letter in it, even if 
> that letter is combined with other letters. Also from your *small* example 
> pool, it appears that the letter won't be repeated within any single cell. 
> If that is the case... or, if it does repeat in a cell, but you only want 
> to count that cell once, give this formula a try...
>
> =COUNTIF(A1:A100,"*p*")
>
> Adjust the range accordingly and change the letter as needed.
>
> -- 
> Rick (MVP - Excel)
>
>
>
> "Brian" <wolfmanx@charter.net> wrote in message 
> news:uTh51at7KHA.3964@TK2MSFTNGP05.phx.gbl...
>> Thanks for the input.
>> The column may actually contain any number of letters. Examples B1 = pme, 
>> B2 = e, B3 = pe, etc.
>> I want to have a few cells that count the p's, m's and e's.
>>
>> Thanks again,
>> Brian
>>
>> "Dave Peterson" <petersod@verizonXSPAM.net> wrote in message 
>> news:%23tBuKas7KHA.1316@TK2MSFTNGP02.phx.gbl...
>>> This will give you the number of lower case a's in a range:
>>> =SUMPRODUCT(LEN(A1:A100)-LEN(SUBSTITUTE(A1:A100,"a","")))/len("a")
>>>
>>> If you want to ignore case, you can use:
>>> =SUMPRODUCT(LEN(A1:A100)
>>>   -LEN(SUBSTITUTE(upper(A1:A100),upper("a"),"")))/len("a")
>>>
>>> (Substitute is case-sensitive)
>>>
>>> Adjust the ranges to match--but you can't use whole columns (except in 
>>> xl2007+).
>>>
>>>
>>>
>>>
>>> Brian wrote:
>>>
>>>> Howdy All,
>>>>
>>>> I want to count the number of occurrences of a partipular letter in a 
>>>> column
>>>>
>>>> Any help?
>>>>
>>>> THanks,
>>>> Brian
>>>
>>> -- 
>>>
>>> Dave Peterson
>>
>> 


0
Brian
5/8/2010 9:46:39 PM
Reply:

Similar Artilces:

Building Chart based on Column Value
I would like my chart to show rows where "COLUMN C" = "TEAM1". Then I can change "TEAM1" to "TEAM2" and only chart rows where "COLUMN C" = "TEAM2". Does anyone know how to do this? Thanks! Greg Hi Greggy, There is a sample here http://www.edferrero.com/ReportWorkbook.zip (Might be a bit more than what you want, but the techniques are the same) Ed Ferrero http://www.edferrero.com >I would like my chart to show rows where "COLUMN C" = "TEAM1". Then I > can change "TEAM1" to "TEAM2" a...

Changing rows by Columns
Hi, I have a query. I need to show the result of this query changing rows by columns in the table of my report. How I can to make it in SSRS 2005? Best regards and thanks!! Julio I would T-SQL , a new PIVOT command does that "julito" <julito@discussions.microsoft.com> wrote in message news:E79F47EB-504E-494B-AA4F-EFEEFF510A8D@microsoft.com... > Hi, > > I have a query. I need to show the result of this query changing rows by > columns in the table of my report. > > How I can to make it in SSRS 2005? > > Best regards and thank...

How to set the column title in a listbox from Excel
any help here? You can do it two ways. 1.) Include a header in your RowSource Range. 2.) You can put Lablels just above your ListBox to label your ListBox columns. Hope this helps! If so, let me know, click "YES" below. -- Cheers, Ryan "V Hoang" wrote: > any help here? If ColumnHeads is set to true in the properties window, then the header row should not be included in the RowSource or ListFill range. VBA will automatically include the row above the ListFill range as a header if the ColumnHeads property is set to true. "Ryan H&q...

Modify Outlook Default Columns for New Folder??
When I create a new folder to store e-mail, one of the default columns is the "Size" column. I prefer not to have this column in my folders. I know I can right click and remove this column. Is there a way to modify my settings so that this column will never appear when I create a new folder in Outlook? Tom View, Arrange by, if Ol2003], Current View, Define views... reset the view (usually Messages) and modify it. -- Diane Poremsky [MVP - Outlook] Author, Teach Yourself Outlook 2003 in 24 Hours Coauthor, OneNote 2003 for Windows (Visual QuickStart Guide) Author, Google and Othe...

Formula to find the last number of a column (lower cell)
I have a column with numbers. I want a formula that it will be finding the lower cell that has data. For example in column A i have numbers in cells A1, A2 and A3. In cell A10 i want a fotmula. With this formula will see in cell A10 the number that i have in cell A3. If i put a number in cell A4 i want that number to be shown in cell A10. Try the below in cell A10 =LOOKUP(10^10,A1:A9) -- Jacob (MVP - Excel) "yiannis5231" wrote: > I have a column with numbers. I want a formula that it will be finding the > lower cell that has data. For example in colu...

Column chart with 2 Y axis's
I have two Y axis, the secondary is 10x the primary in values. The 1 data series plotted against the secondary axis shows up right on top of the 4 data series plotted against the primary axis. Is there some way to avoid this, so all 5 data series appear side by side with no overlap? Thanks!!! Norm PS Excel 2002 & WIndows 2000 Pro Father Guido ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯ I plan on living forever... so far, so good Plot the data series you want on the secondary axis not once but 5=20 times. Ensure all of them are on ...

Counting rows of blanks across certain columns
I have a survey whose answers were recorded in Excel. The answers for a particular question extend from Q6 to Z505. I need to count the people who did not answer the question (that is, the people, entered in rows 6 to 505 that left columns Q through Z blank). I'm not sure how to do this. Can someone offer a suggestion? Hi You can use a formula like this in Column AA =IF(COUNTA(Q6:Z6)=0,1,"") copy down till AA505 You can use a simple Sum formula now to count the empty ones =SUM(AA6:AA505) -- Regards Ron de Bruin http://www.rondebruin.nl "crossingboston" <...

calendar issues with column headings
I have users that display multipe calendars at once. We are using OL 2003 with Exchange server 2003. When they have 5 or more calendars open, the column heading gets truncated. This is not a problem except that the column header is being center justified instead of left justified. When this happens, the name of the calendar becomes unreadable due to the names being similar in the middle of the calendar name. I found a setting in the views to change this for email column headers, but not for calendars. In OL2007, the calendar column heading is left justified. Is there an easy way ...

Adding sums in rows and columns and colouring cells with conditions
Hi all, I have a long table where i need to add and colour individual cells based on 'days home' and 'days away'. The table is uploaded here https://www.yousendit.com/download/MnFqaUNBUzhoMlYzZUE9PQ In order to automate some of this i'd like to automate some, but preferably all aspects of this, such as: 1. automatically colour the cell orange for "home" and yellow for "away" 2. add separately in the home and away columns the number of days for each 3. add the rows for the alternate lines (ie days only, rates only) I want to do this without yet another...

Grouping columns
I have a spreadsheet where the columns of data are in logical groups. For example, I have 5 columns of data for the month of February, followed by the same 5 columns but for March etc. What I want to do is than when the user scrolls right or left the whole of one month moves and not part of it. is there some way to group the columns so that they will scroll as a unit? Jonathan Blitz AnyKey Limited Israel You can use one unused row, like row 1, and merge the 5 cells across for each month..........then use that row to do your scrolling....... Vaya con Dios, Chuck, CABGx3 "Jonatha...

how do you keep a column in date form
i'm making a spreedsheet in office excel, in column A I have a list of dates. I would type in 4/5 for an date and excel would automatic change the date to 4-Apr. I like this way, but when I got to cell 26, the change will not happen. I type in 4/5 and I get just the number 1 in the cell, for the rest of the cells down, can someone help me. Copy the cell that has the format you like and paste format it to the cells that you want to have the date format. "s2m2" <s2m2@discussions.microsoft.com> wrote in message news:F350F90F-24B9-4B79-BE39-20AB0414015D@microsoft.com......

Can you expand/collapse columns based on a reportitem/field values
I have a report that is driven by accounting periods. The columns are 1, 2, 3, Q1, 4, 5, 6, Q2...YTD. Currently when the report opens all that is shown is Q1, Q2, Q3, Q4, and YTD and the user can expand from there. What I want to happen is, if we are in Q2, I want columns 4,5,6, Q2 to be expanded. So the report should read Q1, 4,5,6, Q2, Q3, Q4, YTD. Is this possible? Thanks in advance Original Stealth, Certainly can. I created the following dataset: SELECT 'Q1' AS Expr1, 1 AS Expr2, 500 AS Expr3 UNION ALL SELECT 'Q1' AS Expr1, 2 AS Expr...

Field with running count of records
Hi, I have a query with fields such as date, Item Number and Quantity. I want to create an additional field called Count that will act like an autonumber. It will assign a value of 1 for the first record, 2 for the second number etc. Can someone tell me how to do this? Thanks, -- Chuck W There are tons of posts on how to create a "ranking" query. You must have a field or fields that uniquely identify the sort order. If you provided significant table and field names as well as your desired sort order, someone could create the SQL for you if you can't search for and fi...

Default Public View has records but columns are blank
A custom entity has a default list view but the entries in the list do not show any values. There are a number of lines in the list with an icon only. If I try to delete one the message says select an entry before attempting operation. I cannot select the lijne either. Have created many views before and never seen this. Other views are ok? Hi Steve, Try publishing the entity and see if this resolves the problem. HTH, Niths "Steve" wrote: > A custom entity has a default list view but the entries in the list do not > show any values. There are a number of lines in the...

HIDDEN COLUMNS #3
SOMEHOW I'VE HIDDEN COLUMNS A AND B, AND NOW I CAN'T UNHIDE THEM. HELP! Click on the header for column C, highlighting the entire column. Without releasing the mouse, drag until you're over the column of row headers (on my version of Excel, in Office 2003, I see the tool tip change to '3C'). Now you should be able to Format > Column > Unhide. "acp20770" wrote: > SOMEHOW I'VE HIDDEN COLUMNS A AND B, AND NOW I CAN'T UNHIDE THEM. HELP! If you select the sheet then go to window and unhide it will restore the Hidden windows. "acp20770&q...

Column A to change font color if column B is not empty
Hi, I'd like to have column A of a sheet to automatically turn to red font when a cell in column B is entered,ie, the Cell A3 will change from red to black when B3 is entered and B3 is a date. Can it be done? Thanks & Regards, Val Hi try: - select cells A3:A10 - goto 'Format - Conditional format' - enter the formula =$B3<>"" - choose a format -- Regards Frank Kabel Frankfurt, Germany dolphinv4 wrote: > Hi, > > I'd like to have column A of a sheet to automatically > turn to red font when a cell in column B is entered,ie, > the Cell ...

Adding and subtracting from a column.
I have a stock list with a "quantity" column. What I would like to do is add the new stock to the existing quantity column or subtract requisitioned items from the quantity column. I guess it is a "self totaling" column I need to make. As a separate exercise I would like to make a new column for orders. Insert a quantity on that column for any of the items ( rows) I want to order and then print it out... BUT I only want to print the rows that have quantities in that column ( i.e. the actual items I am ordering ). This column is not linked to the above column. Could an...

Counting Unique Values within a Group
I have a report that lists students by grade and the amount of money donated by that student's family. If the parents are divorced, the student's name is listed twice, once for each parent. I want to count only the unique student record in each grade. DCount is giving me the count for the whole school regardless of what group detail i put it in. How do I count only the unique records within each grouping? Thanks in advance. I would attempt to create a totals query that groups by whatever and counts something. Add this totals query to your report's record source...

Bridge or Up/Down floating column chart
Might anyone know of an example to a bridge or floating bar chart that I could download and learn from - I need to build a template in excel for lots of Power point slides. I have a book with a picture of one but no examples. Thanks for the time Try either of these tutorial pages: http://peltiertech.com/Excel/Charts/FloatingColumns.html http://peltiertech.com/Excel/Charts/Waterfall.html - Jon ------- Jon Peltier, Microsoft Excel MVP Peltier Technical Services Tutorials and Custom Solutions http://PeltierTech.com/ _______ TFrisch wrote: > Might anyone know of an example to a ...

Repeat values in column A a certain number of times depending on the value in column B
Imagine a set of data as set out below: Column A Column B Apples 24 Pears 36 Oranges 8 I want to poplulate a column (for exampel column A on a new sheet), where the values in column A will be repeated as many times as the value in column B Thus the first 24 rows will say Apples, the next 36 rows will Pears, Oranges. I need a formula that recogonizes that when it gets to row 25 that it should no longer need to copy Apples, but then switch to pears. This might sound like an unusual request but if I can grasp a way to do this I can create the table I need and populate the rest...

selecting the 2nd column of a combo box in a report?
I have a combo box that uses data from a table with the fields (setupid, physician setup, md_PIN). the bound column = 1. The physicians sign on using their name (signing_md) and PIN (signing_md_pin). thanks to advice from this website I have...If signing_md_pin.value = dlookup("md_pin". "[setup table]","[setupid] =" [signing_md] then ... in the event procedure. When I try to get the physician name on the report (signing_md) it returns the physician number (setupid) instead of the name. How do I get the 2nd column of the combo box to the report?Thank you....

How to succesfully sort column of formulas?
I am trying to sort a column of formulas that consist of cel references. Example: Column: Cell 1 holds: =D10 Cell 2 holds: =D11 Cell 3 holds: =D12 Data: D10=1 D11=2 D12=3 When I try to sort the column of formulas, the formulas change cel references to other cells and mess up the data. How can I sort a column of cells of which all of them contain formula and have the cells keep the references to the right place -- Message posted from http://www.ExcelForum.com Hi- If you write your formulae with absolute references rather tha relative references, you can sort them. Formulae should look ...

Count If.....help
I am trying to sum the amount of time two words "high" and "very high" appear in a col....I can get this to work for one word but when i try and nest the statement it doest work - Why and how to i solve it. =COUNTIF('(R2) Risks Log'!L9:L99,"Very High",CountIF(Risks Log'!L9:L99,"High")) thanks. First, your question is ambiguous. Are you tring to count the number of times a cell's contents - as a whole - is either "High" or "Very High"? Or are you looking to count how many times the a) word or b) phra...

Displaying Total Word Count on Cover Sheet
Version: 2008 Operating System: Mac OS X 10.5 (Leopard) Processor: Intel I want to display/show the Total Word count of my document on the Cover Page, when I print my document is is there on the Cover Page. How can I do that? Is there an Auto Text or something like that that I can use? Please anyone reply please. You can use Insert> Field to insert the NumWords Field from the Document Information category. However, the field does not update automatically. You need to update it manually by clicking in the field & pressing F9, by Control/Right-Clicking the Field & selecting...

Row amd column heading
I have received one excel file in which rows number (1,2...) and column name (A,B,...) are in some big font 18, or maybe more. I couldn't find option to make them standard. Thanks in advance, Emilija Hi Emilija, On you toolbar you should have a font box and next to it is the size of the font. Select the row and change the fontsize to 10 for instance. Help, Answer Wizard Change font size From the topics show, select the topic that matches "Change the font or font size" --- HTH, David McRitchie, Microsoft MVP - Excel [site changed Nov. 2001] My Excel Pages: http...