Thread
:
Do until loop
View Single Post
#
2
Posted to microsoft.public.excel.programming
Don Guillett
external usenet poster
Posts: 10,124
Do until loop
It appears that you are doing a lot of unnecessary work here. Selections
are NOT needed. You should be able to do this from anywhere in the workbook
without any selections.
It appears that you are looking for more than one instance of each of the
three text values??? Then, do you want to copy to the next available row on
the desired destination sheet?
If so, there is an excellent example of FINDNEXT in the vba help index. Or,
give exact details of what you are attempting.
--
Don Guillett
SalesAid Software
"JohnP" wrote in message
...
Hi,
I need the following to code to loop, but each time pasting one row
further
down on Sheet 2 until the Control Find function finds "Ele NonRec END".
Cells.Find(What:="ele nonrec", After:=ActiveCell, LookIn:=xlFormulas, _
LookAt:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, _
MatchCase:=False).Activate
Selection.Copy
Sheets("Sheet2").Select
Range("A2").Select
ActiveSheet.Paste
Sheets("Sheet1").Select
Cells.Find(What:="record sent", After:=ActiveCell, LookIn:=xlFormulas,
_
LookAt:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, _
MatchCase:=False).Activate
Application.CutCopyMode = False
Selection.Copy
Sheets("Sheet2").Select
Range("I2").Select
ActiveSheet.Paste
Sheets("Sheet1").Select
Cells.Find(What:="global", After:=ActiveCell, LookIn:=xlFormulas,
LookAt _
:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext,
MatchCase:= _
False).Activate
Application.CutCopyMode = False
Selection.Copy
Sheets("Sheet2").Select
Range("X2").Select
ActiveSheet.Paste
Sheets("Sheet1").Select
Cells.Find(What:="o", After:=ActiveCell, LookIn:=xlFormulas, LookAt:= _
xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext,
MatchCase:=False) _
.Activate
Application.CutCopyMode = False
Selection.Copy
Sheets("Sheet2").Select
Range("AD2").Select
ActiveSheet.Paste
Sheets("Sheet1").Select
Please help!! Thank you in advance.
John
Reply With Quote
Don Guillett
View Public Profile
Find all posts by Don Guillett