Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 12
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default 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
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
Is there a difference between CTRL+D and CTRL+" (quotation marks) AKMMS Excel Discussion (Misc queries) 2 March 22nd 10 07:43 PM
How to make Ctrl-C, ctrl-V work in Office 2007 hj Excel Discussion (Misc queries) 1 June 23rd 09 01:09 PM
Excel 2007: Ctrl+PgUp or Ctrl+PgDn with Protected Sheets DrDave Excel Discussion (Misc queries) 1 July 28th 08 04:12 AM
Search in xl ( Ctrl+F ) FC Excel Discussion (Misc queries) 1 October 25th 07 11:21 PM
How to forbid ctrl+c and ctrl+X in sheet? GR Setting up and Configuration of Excel 2 December 24th 06 03:39 AM


All times are GMT +1. The time now is 04:57 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"