simple code that does a search for me and returns a string
Another possibility (using Gary''s Student's search word "happiness")...
Sub FindMe()
Dim strText As String, strFound As String
strText = "happiness"
On Error Resume Next
strFound = WorksheetFunction.Index(Range("A:A"), WorksheetFunction. _
Match("*" & strText & "*", Range("A:A"), 0))
MsgBox strFound
End Sub
--
Rick (MVP - Excel)
"Southern at Heart" wrote in
message ...
I've been recording macros to figure how to do what I need to do, but
can't
quite get it...
I need my code to search column A, and find the cell that contains (in
it's
value) the string strText. strText will just be part of it's value, but
there will only be one cell in column A that matches.
I need this asigned to a new string, strFound
thanks, much.
|