Close Window
Free Ebook
Get Your Free Excel
Top 15 Excel Tutorials from
Instant Access!

How To Count Specific Words In A Cell Range

I don't know if this is a 'count' formula or not, but i want to count the number of times a specific word is displayed in a cell range.

for example the cell range is A4:C10 and the word is 'hello'


Free Excel Courses

Similar Excel Tutorials

How to count the number of cells that contain specific text within a spreadsheet in Excel. I'll show you how to cou ...

How to count the number of errors in a range in Excel; also, how to count the occurrence of a specific error. Sect ...

How to count cells that match text at the start or the end of a string in Excel. If you want a fuller explanation o ...

Find if a cell or range of cells contains a specific value in Excel. This method can be used on individual cells wh ...

Helpful Excel Macros

- Count words in cells with this user defined function (UDF). This UDF allows you to count the number of words that are w

- UDF to count the number of words in a cell or range with a user-specified delimiter. This means that you can tell the f

- This is the ultimate Lookup Macro for Excel. It will search every worksheet in the workbook and return all of the mat

- This Excel Macro works like a better Vlookup function because it returns ALL of the matching results. Run the

- This is very similar to the other Vlookup type Macro in that it returns all of the results that match a particular se

Similar Topics

Hello, I'm trying to count the number of times a name appears across multiple worksheets but I can't seem to figure it out.

I have 6 sheets to count and all the names are in column A (from A1:A100) on each sheet. The names are not in a particular order.

On sheet 7 I want to have a cell beside each persons name that counts the number of times their name appeared on the other 6 sheets.

For example Sheet 7 (called total) would have

Joe 5 (where 5 is the outcome of the formula I'm looking for to count all the times "Joe" appears on sheets 1-6).

I have it counting per sheet with =COUNTIF(A1:A130,"name") but this is not quite what I am looking for.

Thanks in advance for any advice.

Edit: I am using Excel 2007 w/ windows XP

for example if you have values of

1 0 1 1 1 0 0 0 1 1 1 0 0 0 1 1 0 0 0 1 1 1
how to count number of occurances where value of 1 is 3 consecutive times? Obviously answer is 3 in this instance but is there an excel formula to count/sum this?

Thanks in advance

Hello all,

Until now I have been able to find all my answers through searches. As a VBA novice, it has been very helpful. I am stumped on this one, however. I am trying to autofill from the selected cell in Column C down. I would like it to stop at the last cell with data in Column B. This is the code I have so far:

Selection.AutoFill Destination:=Range(Selection, Selection.End(xlDown))

This does the autofill, but doesn't stop at the last cell with data in Column B.

In the past I have use this code to acheive similar results:

Dim endRow As Long
endRow = Cells(Rows.Count, "B").End(xlUp).Row
Range("C2").AutoFill Destination:=Range("C2:C" & endRow)

The problem with this code is that I will not always be starting in "C2". I need code that uses whatever the selected cell is.

All help is appreciated. Thanks!

Hello Everybody,

I am hoping for some assistance. Here is what I have....

I am trying to get counts of certain values.

This is in the same workbook but different sheets.
On sheet 1 is where my formula lies. In a cell, I want it to look at sheet 2 column B and look for instances of "A", then I want it to look in the same row it found "A" and look at the value in column "N" and evaluate if there is an amount. If there isn't skip it and don't count it, if there is a value count it if it falls within a given range.

An example of the formula is below...what am I missing?


Thank you in advance for your assistance.

Can anyone help me with creating a macro that will save the worksheet as a pdf in a specific folder with the value of a cell and the date. This is what I have so far.

ActiveSheet.ExportAsFixedFormat Type:=xlTypePDF, Filename:=Range("H10").Value & Format(Date, "mmdd")

This saves it as the correct cell value + the date, but it saves it to my documents. I need it to save to a shared folder on a network drive.

Any help would be greatly appreciated.

For some reason - I can not type the same word and have it automatically come
up the next time when I enter it will not automatically come up. I must of
lost that option some how. Please help

I would like to create a formula that removes a specific character if it appears in a cell. In this case, if the text in the name cell starts with * or #, remove it. Otherwise, keep the contents intact. Examples:


Text in Cell Desired Results
*Bobby Abreu Bobby Abreu
#Erick Aybar Erick Aybar
Jason Bartlett Jason Bartlett

Is there a formula that will get me where I want to be?



Hi, hope someone can assist, i want to add some arrow syimbols in to a formula, so that when the formula works out it shows an up arrow for higher or a down arrow for lower, i am using this formula at the moment because i dont know any better but it works, putting in the word up or down:

I have entered the following formula in to a cell: =IF(S3<R3,"DOWN","UP") it works however i want to replace the word Down and up with the relevant arrows symbol. How do i do this?


I would like the contents of a selected active cell to be displayed in a certain other cell, say R4. When another cell is selected and active, that cell's contents should be displayed.

I have an array of 9 columns and 20 rows with equity symbols and conditionally formatted to show the severity of price movement in either direction.

Instead of typing in the value of whatever cell a trader is looking at I would like for them to just be able to click on the cell and have that symbol copied into R4 so some detailed information can be displayed for them.

Can't find a thing about this on any forum or msdn.

Hope I'm explaining this at least somewhat clearly.


How do I get the colors to change automatically when I use a drop down list.
Per say here is what I am trying to do

If a certain "word" is used from the drop down list I want the background of
that cell to change its color to "green." And if later I change the "word" to
another from the drop down list, it will change it's color to a specified

The drop down list that I use was created from cells that have the colors
already in the "word", but I do not know how to make the list show the colors
so it puts the word & color automatically in the drop down list to the cell
with the drop down (if that makes any sense).

If there is a way, please spell it out simple enough for me to understand,
as I don't know fully the capabilities of formulas or vba.

I'm using some basic code below in an on Workbook Open event to format cells with a value less then 2 and less than 1 with a particular color.

The code works, but it really slows my worksheet down when opening. Is there better way to write this? Thanks!


Dim myRange As Range
Dim cell As Range
Set myRange = Range("V6:V50000")
 For Each cell In myRange
 If cell.Value < 2 Then cell.Font.ColorIndex = 5
 If cell.Value < 1 Then cell.Font.ColorIndex = 3

I am trying to sum all numbers <0 using the SUMIF formula in Excel 2003.

FORMULA: =sumif(range,criteria,sum_range)

I got it to work, but I have cell ranges to total that are not next to each
other (such as A5:A15 and C5:C15).
When selecting the ranges for the formula, Excel writes them A5:A15,C5:C15

because of the comma (,) between the cell ranges Excel is reading the A5:A15
as the range and C5:C15 as the critera. How can I get this formula to allow
me to select multiple cell ranges?

All help is appreciated.

Thank you.

I would like to copy a small table from Word into one cell in an Excel
worksheet. The first column of the table is a list of numbers. I tried
converting the table into text with manual line breaks and tab stops to
divide columns and rows, but that didn't solve my problem.

Excel pastes the data into several rows. When I try to merge them, I
get a warning that the selection contains multiple data values, and
merging into one cell keeps the upper-left most data only.

What I tried that didn't work:
* Formatting the Excel cells as text before pasting the data.
* The various options for "Paste Special." The closest I got was
inserting the table as a Document Object, which could be a workaround,
I guess.
What I am saving for when all else fails:
* The obvious solution of copying row by row into one Excel cell.

The data in the table is information about my dad's medications. I
would like to have reference charts of how to identify the strength of
each tablet by its color and markings. I got the info from the
manufacturers' websites and entered it into tables in Word, which I
would like to copy into a more comprehensive file I am creating in
Excel. The first column of each table is the strength of the tablet,
entered as 1 mg., 2 mg., etc. The subsequent columns describe the
shape, color, and markings. There are 3 tables, each with about 4-5

Is there a way to copy each one - whether as a table or as text - into
a single Excel cell without losing data?

Many thanks.

Corporate edict.

I have a worksheet that is locked and protected now, except for cells in a certain collumn. I have named the cells in that column "MS96A".

If a user enters a date in a cell or range of cells anywhere in the column, the changed cells also need to be locked and protected (Once they enter a date, it is not allowed EVER to be changed again. Corporate requirement! *Shrug*).

What I am looking for is this. If the user selects that cell again, they will get the usual pop-up message, "The cell or chart that you are trying to change is protected..."

I think I am close, but I am getting an "End If without block If" error on the If Clause.

Sub Worksheet_Change(ByVal Target As Excel.Range)
Dim MRange As Range
Set MRange = Range("MS96A")
' If Not Intersect(Target, MRange) Is Nothing Then For Each cell In MRange Sheets("Sheet1").Unprotect Password:="temp"
cell.Interior.ColorIndex = 3
cell.Font.Color = vbBlack
Selection.Locked = True
Selection.FormulaHidden = False
Next cell
ActiveSheet.Protect Password:="temp", _
DrawingObjects:=False, _
Contents:=True, _
ActiveSheet.EnableSelection = xlUnlockedCells
End Sub

Regarding Charts in Excel:

Is there a way to have the Min and Max values adjusted dynamically for the Scale of the values being displayed ??

I know that I can use named ranges to display various sections of data -- month by month, or quarter by quarter, for example.

But when the value of these ranges vary greatly from section to section I end of having to manually go and adjust the Min and Max values of the chart scale.

For example, if I was looking at a graph of the S&P 500's prices last November, a Min and Max range of 750 to 1200 would be fine. But if I had a dynamic range established and scrolled over to view the S&P 500's prices for this past February, I would need a Min and Max range of around 650 to 850.

Is there a way to have these Min & Max values adjust automatically depending on the values being displayed ??



Hello, what I would like to do is take a portion of a sheet..... So the cells I want to mirror are in the proposal sheet cells B32 x F51. And then mirror the exact duplicate copy to another sheet. The other sheet should have those same values at A20 X G39. What I am trying to do is have a sheet that has skus, prices, and so forth and then when I add,delete, merge, color, or do anything to the cell on the "proposal creation" sheet I want it to mirror only a specific cells to another sheet that is "salesman copy" that we will print to clients. So this way ont he proposal copy a salesman can insert rows or even change the color of the cells and then have it mirror exactly the same on the "salesman copy" which is what we will print for clients. Thank you.

Okay, so I tried (for hours) to find a solution to this and have finally gotten frustrated to the point where i think asking here will be my best bet.

Basically I want to export data from excel worksheets to various places on a word document I had. I have created a word template as well as bookmarks for that template, as that seems to be the recommendation for performing such a task with excel.

My problem is ... Now what?

I basically have 1 constant worksheet that contains all my affiliates info (Name, Address etc), which i'd like to use to populate some bookmarks in my word template, and then i have another worksheet for the previous month, indicating sales etc for that affiliate. I intend on adding a new worksheet every month that i would use to create new invoices.

Furthermore, i'd really like to be able to update a new file (or perhaps a new page on the same file) for each company with the use of a button, similar to the one's you'd see in an access form.

Can anyone help? Let me know if you need me to clarify.



I have workbook in which I want to save a specific worksheet to a new file with only the values saved - all data in this worksheet are references to cells on another worksheet, which is using VLOOKUP to pull data from a database.

Found the following code and it gets me close, but it copies the cell references, not the values. It also allows me to specify the file name from a cell reference.

I want the new workbook file to simply be saved, not opened, and a message box to display stating where the file was saved (will always be in the same location on the LAN).

What modifications do I make to this to get this to work per above requirements?

Sub CopyMe()
Dim SaveMeAs As String
SaveMeAs = Sheets("Sheet1").Range("B2").Text
ActiveWorkbook.SaveAs Filename:="C:\My Documents\" & SaveMeAs
End Sub

Is there a trick to copy-paste a group of cells into Outlook? I don't want to paste as a picture (shows up as an attachment and is lost when someone else Replies), but formatting is skewed when pasted as an Excel object. Right now I'm recreating the table in Word, then pasting, which doesn't loose formatting.

A specific problem is cells which don't have borders show up with very light grey borders in Outlook. This, I do not want.


Hi All,

I am trying to make excel automatically add a leading zero to values which are 5 digits long;

i.e. number input is 15185, then excel automatically changes it to 015185.

If I put a Customer Number Format of 0##### it works, however, a user could put any length of number into these cells, and if the number is less than 5 digits I don't want a leading zero.

Is there any way of writing a small macro to sort this out.

The numbers would be input into range B16:223.

Many thanks,


I need the necessity do delete a sequence of sheets in my workbook.
If I use this code:

With ActiveWorkbook
If .Worksheets.Count >= 5 Then
For n = 5 To .Worksheets.Count
Next n
End If
End With

I receive a confirmation message box with this message:

"Data may exist in the sheet(s) selected for deletion. To permanently delete the data, press Delete" [DELETE] [CANCEL]

I wish to delete all sheets without receiving any message.

Is it possible?

Many thanks in advance for your kind support.



I have cells in a column, some colored yellow, some not. I am trying to use
the SUMIF function to sum only the cells in the range that are colored. Can
this be done? Can I enter something in the "criteria" part of the formula
that can do this?


I also tried to use the CELL function's color feature, but I couldn't get it
to work right. I don't know how to get Excel to recognize if a cell is
colored in a formula.

It might just be that I don't know what this means in Help:

"color" --> 1 if the cell is formatted in color for negative values;
otherwise returns 0 (zero).

Can anyone help?

I have a co-worker's file that he is having trouble with. He is using Excel 2000 SP3. When copying a cell with a formula in it of "=D6+C6" and pasting it into the next cell down, it will display the same value in the cell as the calculated value from above, but has the correct formula displayed in the formula bar of "=D7+C7".

A1: 50
A2: 10
B1: 60
B2: 20

A3: Formula: =A1+A2 Displays: 60
Right click A3, Copy, right click B3, paste
A3 displays 60

When I click save, it will change the display value to 80.

I am trying this on his workstation and mine. Mine has Office 2010, so I think there might be an issue with the file itself.

Also, not just copy and paste. I can also just click the top cell after filling in the formula and then drag the bottom right of the cell downward and it will do the same of filling in the correct formula, but have the incorrect value.

I know that I could get him to just click save each time before really looking at the results, but that is just a band aid to the problem.

Any ideas how to fix this?

I found this solution for "drop down list with hyperlink" but it did not work.

Perhaps a better solution is to use a workaround that relies on the HYPERLINK function to refer to whatever is selected in the drop-down list. For instance, if you have your data validation drop-down list in cell A1, then you might put the following formula in cell B1:

=HYPERLINK(A1, "Goto Link")

The solution directly above provides exactly what I am looking for
in the field where I write the formula, but it fails to hyperlink.
I have created a drop down list and linked each one of them to a
specific worksheet. When I select them individually they link to
appropriate worksheet. But when I select them in the drop down
list I receive the following error when I select the Hyperlink in
cell B1 as directed above.

"Cannot open the specified file"

Any thoughts?



How would I concatenate a large range of cells, most of which are blank, and add a comma between each cell's value?
My range is E2:Y2 (I will be filling down), but most of the cells are blank. For example, if I F2=9, I2=11 and X=25, I would like to display them as: 9,11,25.
If in the next row, G=10, K=15 and Y=27, they should look like this: 10,15,27.

Thanks in advance!


Related pages

rotating rostercountif command excelword vba message boxexcel datedif functionvba excel while loopbillion to crore conversionfedex volumetric weight calculation1d cutting optimizer freeexcel scroll lockhow to calculate hours and minutes for payroll in excelhow to round off in excel 2007payment record template excelautocorrect not workingexcel count occurancesconvert 5 kilos to stones and poundspareto chart in excelconvert stones to kilos calculatorsumifs formulaworking out holiday entitlement pro rata calculatormail merge in excel 2003converting dat files to excelhow to combine rows in excelexcel vba hide columnmacro unprotect sheethow to delete multiple cells in excelloop through worksheets vbabasic payslip template excel downloadnot equal vbasports fixture generatorexcel eigenvectorvba code to send emailexcel solver macroexcel solver vbagoogle earth northing eastingexcel transpose macroexcel combine multiple worksheetsscrollable drop down menuexcel substringpercentrank excelvba convert to integerfuta calculatorexcel set delimitergenerating synonympop up excel calendarsharpe ratio formula excel15 minutes in decimalexcel percentile functiondeclare global variable vbaexcel subscript out of rangemailto link with subject and bodyexcel amortization templatems access export to excel vbazip code lookup table excelcreating a userform in excelweight loss competition spreadsheet templateemployee tracking templatevba instr examplevba cutist to est convertexcel password remover macrohow to enter square root in excelbi weekly timecard with lunchexcel 2007 merge worksheetsexcel formula for months between datesexcel npv calculationexcel convert number to words chequespanish keyboard commandsexcel unprotect sheet vbaexcel macro last rowhundredths to minuteshow to prefix zeros in excelconvert fractions to millimetersexcel if iserrorrandom fixture generatorexcel formula percentage change