LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Modifying FindNext and Copy Code

I am trying modify code that Tom Ogilvy provided in a post
on 8/23/04 to basically do the same steps required in
Lolly's original post, except that I want to cut the
entire row out of the first worksheet and paste it into
a second worksheet. My problem is that I'm only getting
one out of the five records I know exist in the
spreadsheet, and I'm sure the issue is between the "Else"
and "Loop" statement. So far, the code looks like this:

Dim rng As Range, rng1 As Range
Application.Worksheets("Pivot Data").Select
Set rng = Range("PivotData").Find(What:="Funky: Ticket
Before Notify", _
LookAt:=xlWhole, LookIn:=xlValues)
If rng Is Nothing Then
MsgBox "Data Not Found"
Exit Sub
Else
Set rng1 = rng
Do While rng1.Offset(1, 0).Value = "Funky: Ticket
Before Notify"
Set rng1 = rng1.Offset(1, 0)
Loop
Range(rng, rng1).EntireRow.Copy _
Destination:=Application.Worksheets("Errors").Rang e
("A2")
End If

I'm pretty sure I'm not giving the loop the correct
instruction, but I don't know how to fix it. The text
string that I'm looking for is in Column V (Column 22).

Any help would be very much appreciated.

Thanks in advance,

Val
 
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
FindNext and Copy Help (Urgent) Tom Ogilvy Excel Programming 3 September 15th 05 04:08 PM
FindNext and Copy Help (Urgent) Don Guillett[_4_] Excel Programming 1 August 23rd 04 07:04 PM
modifying formulas with code Rick B[_6_] Excel Programming 3 January 28th 04 02:03 PM
Need Help Modifying Code JStone0218 Excel Programming 2 January 19th 04 10:27 AM
Help modifying code BruceJ[_2_] Excel Programming 1 December 10th 03 12:52 AM


All times are GMT +1. The time now is 09:06 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"