Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Search macro


I'm trying to make a macro that copies the contents of a cell, pastes i
into the find dialog box, then searches for whatever was pasted.
started it with a recording then tweaked it. Unfortunately, I came t
realize I'm not quite sure how to tell it to paste the copied data int
find. Any ideas? Here's my code:

Dim Term

Term = Selection.Copy
Cells.Find(What:="Term", After:=ActiveCell, LookIn:=xlFormulas, _
LookAt:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext
_
MatchCase:=False).Activat

--
carg
-----------------------------------------------------------------------
carg1's Profile: http://www.excelforum.com/member.php...fo&userid=1527
View this thread: http://www.excelforum.com/showthread.php?threadid=31496

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,123
Default Search macro

Hi

Maybe this is useful
http://www.rondebruin.nl/find.htm

Post back if you need more help

--
Regards Ron de Bruin
http://www.rondebruin.nl


"carg1" wrote in message ...

I'm trying to make a macro that copies the contents of a cell, pastes it
into the find dialog box, then searches for whatever was pasted. I
started it with a recording then tweaked it. Unfortunately, I came to
realize I'm not quite sure how to tell it to paste the copied data into
find. Any ideas? Here's my code:

Dim Term

Term = Selection.Copy
Cells.Find(What:="Term", After:=ActiveCell, LookIn:=xlFormulas, _
LookAt:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext,
_
MatchCase:=False).Activate


--
carg1
------------------------------------------------------------------------
carg1's Profile: http://www.excelforum.com/member.php...o&userid=15271
View this thread: http://www.excelforum.com/showthread...hreadid=314969



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 42
Default Search macro

Assign to a variable then call it - no copy paste required
and u still have the flexability to change cells after the
assignment.

Dim z As String
Range("B3").Select
z = ActiveCell.Value
Cells.Find(What:=z, After:=ActiveCell,
LookIn:=xlFormulas, LookAt _
:=xlPart, SearchOrder:=xlByRows,
SearchDirection:=xlNext, MatchCase:= _
False).Activate
-----Original Message-----

I'm trying to make a macro that copies the contents of a

cell, pastes it
into the find dialog box, then searches for whatever was

pasted. I
started it with a recording then tweaked it.

Unfortunately, I came to
realize I'm not quite sure how to tell it to paste the

copied data into
find. Any ideas? Here's my code:

Dim Term

Term = Selection.Copy
Cells.Find(What:="Term", After:=ActiveCell,

LookIn:=xlFormulas, _
LookAt:=xlPart, SearchOrder:=xlByRows,

SearchDirection:=xlNext,
_
MatchCase:=False).Activate


--
carg1
----------------------------------------------------------

--------------
carg1's Profile: http://www.excelforum.com/member.php?

action=getinfo&userid=15271
View this thread:

http://www.excelforum.com/showthread...hreadid=314969

.

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 22,906
Default Search macro

carg

Dim Term As String
Term = Selection.Value
Cells.Find(What:=Term, After:=ActiveCell, LookIn:=xlFormulas, _
LookAt:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, _
MatchCase:=False).Activate

Gord Dibben Excel MVP

On Thu, 18 Nov 2004 10:47:31 -0600, carg1
wrote:


I'm trying to make a macro that copies the contents of a cell, pastes it
into the find dialog box, then searches for whatever was pasted. I
started it with a recording then tweaked it. Unfortunately, I came to
realize I'm not quite sure how to tell it to paste the copied data into
find. Any ideas? Here's my code:

Dim Term

Term = Selection.Copy
Cells.Find(What:="Term", After:=ActiveCell, LookIn:=xlFormulas, _
LookAt:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext,
_
MatchCase:=False).Activate


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
Macro for Search Brigette Excel Discussion (Misc queries) 6 December 17th 09 04:44 PM
Search Macro Gary Excel Discussion (Misc queries) 1 March 29th 07 04:53 PM
search macro laprosa Excel Discussion (Misc queries) 0 November 26th 04 05:08 PM
Excel XP VBA code to search all macro code in Excel module for specific search string criteria Ed[_18_] Excel Programming 4 May 20th 04 02:08 PM
Excel XP VBA code to search all macro code in Excel module for specific search string criteria Frank Kabel Excel Programming 0 May 19th 04 08:11 PM


All times are GMT +1. The time now is 09:19 AM.

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"