#### Counting occurences of codes in cells

```I have a spreadsheet with various codes separated by periods, in a single
cell. Like:
C
T
C,R
T,C,R
R
and so forth.
It's easy to count the single codes but how do I cound the "C" when it's
with another character? There must be a simple way, without writing code,
to do this. Is there?
Thanks!
```
 0
7/10/2008 8:43:55 PM
excel 39879 articles. 2 followers.

3 Replies
733 Views

Similar Articles

[PageSpeed] 8

```maybe...

=countif(a1:a10,"*" & "c" & "*")
or
=countif(a1:a10,"*c*")
or if x99 contained the letter c.
=countif(a1:a10,"*" & x99 & "*")

salgud wrote:
>
> I have a spreadsheet with various codes separated by periods, in a single
> cell. Like:
> C
> T
> C,R
> T,C,R
> R
> and so forth.
> It's easy to count the single codes but how do I cound the "C" when it's
> with another character? There must be a simple way, without writing code,
> to do this. Is there?
> Thanks!

--

Dave Peterson
```
 0
petersod (12004)
7/10/2008 9:08:53 PM
```If you will only need to count each cell once if it has "C" anywhere in it,
then:

=COUNTIF(A1:A5,"*C*")

HTH,
Paul

--

"salgud" <spamboy6547@comcast.net> wrote in message
news:3g2xaq45h0gt\$.1h1qgl7yy49go.dlg@40tude.net...
>I have a spreadsheet with various codes separated by periods, in a single
> cell. Like:
> C
> T
> C,R
> T,C,R
> R
> and so forth.
> It's easy to count the single codes but how do I cound the "C" when it's
> with another character? There must be a simple way, without writing code,
> to do this. Is there?
> Thanks!

```
 0
PCLIVE
7/10/2008 9:10:10 PM
```On Thu, 10 Jul 2008 17:10:10 -0400, PCLIVE wrote:

> If you will only need to count each cell once if it has "C" anywhere in it,
> then:
>
> =COUNTIF(A1:A5,"*C*")
>
> HTH,
> Paul

Thanks to you both!
```
 0
7/10/2008 9:31:16 PM

Similar Artilces:

Cell formating in Excel?
Is there a way to have a scroll bar in a single cell? No. -- Best Regards, Luke M "pmarina" <pmarina@discussions.microsoft.com> wrote in message news:5D25B665-B7B8-477D-AAF8-80A347FFA0DD@microsoft.com... > Is there a way to have a scroll bar in a single cell? ...

Excel-how (find/replace) for multifmat cells w/o changing fmat
For a client, i need to be able to find and replace words in cells with 2 formats. But when you replace them,it changes the format of the whole cell, and not just what you changed. Is there any way to work around this without changing the format after all of the find and replaces? Saved from a previous post, but this one has some wordwrap problems fixed: I think you'd have to keep track of each character's font attributes. This works very slowly, but works: Option Explicit Option Compare Text Type myCharacter myChar As String myLen As Long myName As String myFo...

Pivot table and counting.
I have a pivot table that gives me the number of rides done by a van. I can have the pivot table return the number of rides, but what I need is the number vans that participated for a certain day. Example, it is possible to have 27 trips done by 18 vans, how can I count the number of vans and not addup the van number? Any help appreciated. Thank you, Joe Hi Joe We need a bit more information on how your source data table is set up. What information do you have in each column? -- Regards Roger Govier sacredarms <sacredarms@discussions.microsoft.com> wrote: > I have a pi...

Copy paste code for a #REF
Hi, I am looking for a workbook code that runs when the file is opened. In col H I have a formula (=INDIRECT(G8)) which searches data from another series of folders. If the source folder is open it returns either a value or 0. If the relevant source file is closed it returns a #REF. What I would like is a code that looks through all the cells in Col H, if it finds a numerical value or 0 it does a copy/paste values on the cells, if it finds a #REF it does nothing. The file is a update folder so the REFs will be in the future and the values in the current/past which i nee...

Set RN = Range(Cells(2, 1), Cells(r, 1)) error
What wrong with this. It create error. How can I improve to get rid the error? Set RN = Range(Cells(2, 1), Cells(r, 1)) Thanks Daniel Hi Daniel, Too much missing information - has r been declared and what data type is it and what value does it have. What property of the range are you trying to store in the variable RN? What type of variable is RN and has it been declared. -- Thanks, Shane Devenshire "Daniel" wrote: > What wrong with this. It create error. How can I improve to get rid the > error? > > Set RN = Range(Cells(2, 1), Cells(r, 1)) > &...

Cycle Counting
Hello, I am looking for ideas on how to cycle count serial number tracked items without increasing workload. Our serialized items are barcoded but the problem is the are situated on the pallet incorrectly and the pallet is placed on a third level of a racking system. If we could just cycle count based on item count and not include the serial number it would make it easy. Is this possible in Great Plains. We are running Great Plains 8.0. Any suggestions are greatly aprreciated. Thank You, Brian Morris Database Administrator ...

change highlight color on active cells
How do I change the active highlight color of an active cell. Louis Only though VBA. Private Sub Worksheet_SelectionChange(ByVal Target As Excel.Range) Static OldCell As Range If Not OldCell Is Nothing Then OldCell.Interior.ColorIndex = xlColorIndexNone End If Target.Interior.ColorIndex = 6 'yellow Set OldCell = Target End Sub This is sheet event code. Right-click on the sheet tab and "View Code". Copy and paste into that module. Chip Pearson has a great add-in named Rowliner.xla that will make the highlighting available for all sheets and workbooks. The code above w...

Count
Hi, I would like to know how which formula I should use to count some codes & to ignore the duplicated codes, for example in column A: Code 1234 4321 4321 1234 1234 3214 Now, I want Excel to count & the result is 3 which are: 1234-4321-3214 Yes I can use PivotTable, but I would like to use a formula because I have to deal with this every day. I appreciate your support. -- MFS22 COUNTIF will do it. =COUNTIF(Rng,Rng), where the criterion is the same as the range: e.g =COUNTIF(A3:A8,A3:A8) HTH Peter "MFS" wrote: > Hi, > I wo...

How do I count the # of times a value reoccurs and plot it over ti
I wish to plot a number of errors made by each users and compare it over time. I have a column of user ID's and a column of dates. I want the chart to count the number of times each user ID appears and plot against it's corresponding date. However, each time I try to do this, the chart appears wrong. Any ideas? In article <9595B2A1-8282-4AB3-8511-A6776E108164@microsoft.com>, Stephen@discussions.microsoft.com says... > I wish to plot a number of errors made by each users and compare it over > time. I have a column of user ID's and a column of dates. I want t...

format cells #4
hi. how can i set by default the cell formatting to 'general' or 'number' or even 'text'? i mean i dont want excel to correct let's say: 1.5 to 01.may or 9/12 to 09.dec. is this possible? thanks. (i have some programs which export data to excel and instead of numbers in excel appear dates and i can't set the cell format before the data is exported) -- notrace2004 ------------------------------------------------------------------------ notrace2004's Profile: http://www.excelforum.com/member.php?action=getinfo&userid=34817 View this thread: http://www....

Formatting cells in Excel with Ascending/Descending order
I am trying to insert a drop down asceding/descending arrow in the cell of the excel document. When you click on the arrow which is a small box on the right side of the cell, it will organize all figures/data in that column and you can choose between ascending/descending, or how you want to organize it. Thank you -- Andrew ...

Line count
I am working with a program called Dictaphone. We use Word 2007 in this program. The line count on Dictaphone and the line count in Word 2007 are different even though the Dictaphone text is retrieved from Word 2007. Why would they be different? What is the difference between virutal line count and physical line count? ...

count number of characters in rich edit control
How can i count number of characters in rich edit control 2 If u mean controls of type Rich TextBox control, try RichControl1 RC1; CString Mes=RC.GetText(); int n=Mes.GetLength(); "Rahul" <Rahul@discussions.microsoft.com> wrote in message news:7743023C-EA83-4ACA-AB67-F1AE7279F1EB@microsoft.com... > How can i count number of characters in rich edit control 2 EM_GETTEXTLENGTHEX, WM_GETTEXTLENGTH, WM_GETTEXT, EM_STREAM* "Rahul" <Rahul@discussions.microsoft.com> wrote in message news:7743023C-EA83-4ACA-AB67-F1AE7279F1EB@microsoft.com... > How can i co...

"PasteSpecial method of Range class failed" occurs in one instance of Excel but not another
Hi All, I have this particular piece of code in an application created on Excel2000: .. . . . . ..range("B" & finger).PasteSpecial xlPasteValues ..range("B" & finger).PasteSpecial xlPasteFormats .. . . . . I open the application in Excel2000 on one PC and I get the "PasteSpecial method of Range class failed" If I open the same application in Excel2000 on a different PC I do not get the error and the application works as expected. Can anyone tell me why this happens? Thanks in advance, Andrew On 7 Jul 2004 19:00:59 -0700, nocalves@hotmail.com (Andre...

Set area around text in a cell
Is there a way to set the spacing for text in a cell? With tables in Word, there's the option to set the distance from the gridlines to the text on the sides and top & bottom. Is there some sort of option in Excel that would perform this also? Thanks, Laurie Hi not as far as i know - best i can think of is that you can "indent" in a cell (toolbar icon) ...so if you selected the area you plan to use & indent them all it may give you what you're after. Cheers JulieD "terrapinie" <terrapinie@yahoo.com> wrote in message news:20f402b4.0409300711.1...

Is there a way to insert an excel spreadsheet filename into a cell within the same spreadsheet, like the &[File] command in the Header/Footer screen? -- Thanks, RickS yes =CELL("filename") -- Gary Keramidas Excel 2003 "RickS" <RickS@discussions.microsoft.com> wrote in message news:A801EEC7-608B-4394-B991-BBBC889D451A@microsoft.com... > Is there a way to insert an excel spreadsheet filename into a cell within > the > same spreadsheet, like the &[File] command in the Header/Footer screen? > -- > Thanks, > Ric...

error code 0x80044150
am getting the above mentioned error code while trying to upload some contact details into MS Dynamics...... Only sme 200 records out of 1500 are showing the error. Any help will be very much appreciated. Thank U. ...

updating time once only when a cell is filled
Hi, Excuse my lack of experience with excel, I tried to get an answer googling for this problem I have, but I didn't succeed yet solving it. I'm trying to fill a form using excel, but I want that whenever a cell is filled, the time it was filled is updated. The problem I find is that time is updated in all the cells whenever a cell is change, do I make myself clear?, imagine I have these table: A B 1 +if(a1="","",now()) 2 +if(a2="","",now()) So initially I have: A B 1 2...

Cell extraction from Multiple worksheets
Hi group, I am new to this newsgroup and am hoping that you can help me out. I took a software/hardware inventory of all the computers in my work's network and imported them all into excel, in their own worksheet. So I have one file, with 128 different worksheets, all containing similar information. What I would like to do is create a new sheet, a summary page, where I can pull the value of the same cell from each sheet and list them. I need to have a list of each computer, with computer name, cpu speed, video card, serial number, ect. If the values that I am searching for are in the same...

Counting sales
I have two different datasets. Each with a common identifier. I need a formula that will reference the identifiers in both datasets and count the number of sales a particular agent made. Example. look up this identifier in the other dataset and then give me the value that is 2 columns over from the identifier in the second dataset. See if this helps: http://contextures.com/xlFunctions02.html -- Biff Microsoft Excel MVP "Dave" <Dave@discussions.microsoft.com> wrote in message news:E7245B37-033F-400E-9CEE-9822BE7CB0F5@microsoft.com... >I have two...

Any way to round using number format codes?
I'd like to have numbers displayed as being rounded up to the next 5000. So, if a cell contains 92,345...I'd like it to display 95,000. Is there any way to do this with just number format codes (instead of with the worksheet fxns?) Thanks in advance. sert Not with format codes. You can display in thousands but not to the nearest 5000. On Mon, 18 Oct 2004 16:15:47 -0400, sert <basurero3@yahoo.com> wrote: >I'd like to have numbers displayed as being rounded up to the >next 5000. > >So, if a cell contains 92,345...I'd like it to display 95,000. > >I...

How to format in a cell that has both text and a formula
I have a cell with this formula ="James Cedric V. Sebua ("& ((TODAY()-B14)/365) & ")" The display is this James Cedric V. Sebua (5.55890410958904) And I want it to be this: James Cedric V. Sebua (5) Thanks Dave Hi Dave, Try: ="James Cedric V. Sebua ("& INT((TODAY()-B14)/365) & ")" -- Cheers macropod [Microsoft MVP - Word] "Dave" <dave@accessdatapros> wrote in message news:EA033D26-48C7-4D91-8855-621A76C8367D@microsoft.com... >I have a cell with this formula > > > =&...

commandbutton code
any can give me codes for the commandbutton .... i ahve simple form then i put two command button ( commandbutton1 for save and commandbtton2 is for exit) what i want is if i click the save it save all the changes made inside of the workbook and if I click the exit it will close the workbook. thanks a lot ..... Hi for saving activeworkbook.save for closing activeworkbook.close -- Regards Frank Kabel Frankfurt, Germany jeff wrote: > any can give me codes for the commandbutton .... i ahve simple form > then i put two command button ( commandbutton1 for save and > commandbtto...

Counting Cells with Conditional Formatting
Is there a way to look at a row of data that is either highlighted yellow or red and to count only the data that is highlighted yellow and give me that number? None of my data is numerical....just one letter data, i.e.: "S" or "U" I just want to count how many of the cells are highlighted yellow in a specific row, if that makes more sense. Here's a UDF (Put in a Standard module) and use it in cell A1, like =CountByColor(A8:H8,6) << where 6 (at present) = Yellow = change to =CountByColor(A8:H8,3) to get the reds HTH Function CountByColor(InRa...

COUNT ? need formula
Hi, I want to track the results of my teams sales performance. I record if it is a sale, no sale, cancelled etc in column M. I thought I'd be able to use the COUNT function/formula to be able to search for all the SALES in column M and place the result in a cell ( column O )but I can't work it out. Any ideas? Damian Hi! Try this: =COUNTIF(M1:M100,"sale") Biff "Diamond Jones" <kwanzaNOSPAM@optusnet.com.au> wrote in message news:43a0e897\$0\$17704\$afc38c87@news.optusnet.com.au... > Hi, > > I want to track the results of my teams sales perf...