Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Easy one: Using Search (Ctrl+F)
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 |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Is there a difference between CTRL+D and CTRL+" (quotation marks) | Excel Discussion (Misc queries) | |||
How to make Ctrl-C, ctrl-V work in Office 2007 | Excel Discussion (Misc queries) | |||
Excel 2007: Ctrl+PgUp or Ctrl+PgDn with Protected Sheets | Excel Discussion (Misc queries) | |||
Search in xl ( Ctrl+F ) | Excel Discussion (Misc queries) | |||
How to forbid ctrl+c and ctrl+X in sheet? | Setting up and Configuration of Excel |