ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Searching a text (https://www.excelbanter.com/excel-programming/346237-searching-text.html)

ylkien

Searching a text
 

Hi,

My purpose is to search a field in another worksheet, and copy it'
adjacent field, and paste it next to my original worksheet field. Th
problem is that I can automatically paste the search text in th
"cells.find". I want to search what i copied from my original field
and not "Help".

Here is my macro code :

Selection.Copy
Sheets("Sheet2").Select
Cells.Find(What:="Help", After:=ActiveCell, LookIn:=xlFormulas, _
LookAt:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext
_
MatchCase:=False).Activate
ActiveCell.Offset(0, 2).Range("A1").Select
Application.CutCopyMode = False
Selection.Copy
Sheets("Sheet1").Select
ActiveCell.Offset(0, 4).Range("A1").Select
ActiveSheet.Paste
End Su

--
ylkie
-----------------------------------------------------------------------
ylkien's Profile: http://www.excelforum.com/member.php...fo&userid=2898
View this thread: http://www.excelforum.com/showthread.php?threadid=48712



All times are GMT +1. The time now is 02:10 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com