Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Find the occurrences of the particular word and appear one time
Hi,
How can I write in excel program to find the occurences of the particular word and the word appear one time only given a particular long list of data and the particular word such as "Frame" appear a lot of time thanks. regards, ben |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Find the occurrences of the particular word and appear one time
You can do it as under. The input box will ask for the word to enter and
will find out how many times it occurs in the active sheet. Sharad Sub checkWord() Dim myWord As String, nwordCount As Integer myWord = InputBox("Please enter the word to find occurances") If Len(myWord) = 0 Then Exit Sub With ActiveSheet For Each c In .UsedRange.Cells If c.Value = myWord Then nwordCount = nwordCount + 1 End If Next c End With If nwordCount = 0 Then MsgBox """" & myWord & """" & " was not found in the active sheet." Else MsgBox """" & myWord & """" & " occurs " & nwordCount & _ " times in the active sheet." End If End Sub *** Sent via Developersdex http://www.developersdex.com *** Don't just participate in USENET...get rewarded for it! |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Find & Replace one cell w/another cell unequal occurrences | Excel Discussion (Misc queries) | |||
Find and count Duplicates (occurrences) | Excel Discussion (Misc queries) | |||
count the occurrences of a month in a date&time cell | Excel Worksheet Functions | |||
verify use of TIME Function, Find Quantity Level compare to time-d | Excel Discussion (Misc queries) | |||
Trying to sum multiple occurrences of a word in a table of texts | Excel Discussion (Misc queries) |