Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
Ben Ben is offline
external usenet poster
 
Posts: 509
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 123
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Find & Replace one cell w/another cell unequal occurrences RealGomer Excel Discussion (Misc queries) 3 September 30th 09 10:05 PM
Find and count Duplicates (occurrences) flds Excel Discussion (Misc queries) 2 June 19th 08 07:13 PM
count the occurrences of a month in a date&time cell Tom Excel Worksheet Functions 6 February 14th 08 05:05 PM
verify use of TIME Function, Find Quantity Level compare to time-d nastech Excel Discussion (Misc queries) 9 July 11th 07 01:58 PM
Trying to sum multiple occurrences of a word in a table of texts Zimina Excel Discussion (Misc queries) 5 November 29th 06 11:20 AM


All times are GMT +1. The time now is 05:34 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"