Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Macro for Search | Excel Discussion (Misc queries) | |||
Search Macro | Excel Discussion (Misc queries) | |||
search macro | Excel Discussion (Misc queries) | |||
Excel XP VBA code to search all macro code in Excel module for specific search string criteria | Excel Programming | |||
Excel XP VBA code to search all macro code in Excel module for specific search string criteria | Excel Programming |