Home |
Search |
Today's Posts |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
InStr function???
-- Rick (MVP - Excel) "Gary''s Student" wrote in message ... Say we are searching for "happiness". Try this: Sub FindIt() Dim s As String s = "happiness" For Each r In ActiveSheet.UsedRange v = r.Value l = Len(v) v2 = Application.WorksheetFunction.Substitute(v, s, "") l2 = Len(v2) addy = r.Address If l1 < l2 Then MsgBox "You can find happiness in cell " & addy End If Next End Sub -- Gary''s Student - gsnu201001 "JT" wrote: I'm looking for a suggestion or code on finding text within a string. For example, I have a field in an Excel spreadsheet that contains a description of a user issue. I want to categorize these descriptions by finding a specific word in the description, e.g., claim, lawsuit, refund, etc. These specific words are supposed to appear at the beginning of the description but users may place them anywhere in the description. I thought of doing using the 'mid' and cycling through the description but that doesn't seem to be a very efficient way to validate whether a specific word appears in the description. Thanks for the help... -- JT |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Search, find or lookup defined text in text string | Excel Worksheet Functions | |||
Find text within a string | Excel Programming | |||
can you find specific text in a string ignoring any other text | Excel Discussion (Misc queries) | |||
backwards find function to find character in a string of text | Excel Programming | |||
How to Find text in String? | Excel Programming |