Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
How do I find out if a cell has my word in it?
There should be an easy answer to this:
I have a table in Excel 2003 and I want to be able to find a way to check if my String variable is anywhere in that cell. The cell contains a random number of names separated by spaces like this: "Jim Ted Bob Sue" I am thinking something like this: Dim myName As String Dim nameCount As Integer For cell = 1 To 100 If ActiveCell.Value = myName Then 'obviously not working nameCount = nameCount + 1 End If Next cell What is the trick to this? Thanks everyone |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
How do I find out if a cell has my word in it?
There is a function: Instr() who returns true is a string is in anothe string -- Kaa ----------------------------------------------------------------------- Kaak's Profile: http://www.excelforum.com/member.php...nfo&userid=751 View this thread: http://www.excelforum.com/showthread.php?threadid=49861 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Find a cell's content in another cell but only as whole word(s) | Excel Worksheet Functions | |||
In Excel, how do I find one word in a set of text in a cell? | Excel Discussion (Misc queries) | |||
Find part of a word in cell | Excel Discussion (Misc queries) | |||
Find last word in cell | Excel Programming | |||
find word in a cell then change cell format | Excel Programming |