Easy one: Using Search (Ctrl+F)
Sub Testfind()
AAAA = ActiveCell.Text
Sheets("LIST").Select
Range("A1").Select
Set rng = Cells.Find(What:=AAAA, _
After:=ActiveCell, _
LookIn:=xlFormulas, _
LookAt:=xlPart, _
SearchOrder:=xlByRows, _
SearchDirection:=xlNext, _
MatchCase:=False)
If Not rng Is Nothing Then
rng.Select
Else
MsgBox AAAA & " was not found"
End If
End Sub
Worked for me.
perhaps try
AAAA = ActiveCell.Value
Are you looking for a date? Finding dates can be problematic using Find.
Post back with more information if the above does not work.
Regards,
Tom Ogilvy
Paul wrote in message
...
I wrote a macro that takes the text in the active cell
and plugs it into the Excel search thingy. Here's the code:
AAAA = ActiveCell.Text
Sheets("LIST").Select
Range("A1").Select
Cells.Find(What:=AAAA, After:=ActiveCell,
LookIn:=xlFormulas, _
LookAt:=xlPart, SearchOrder:=xlByRows,
SearchDirection:=xlNext, _
MatchCase:=False).Activate
BUT IT DOESN'T WORK. Please!! - HELP!
Paul
|