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: 67
Default many types of loops

So I am trying to do a loop. I used the excel help but its not that
helpful. I am currently trying to do a find loop but also when the
word is found it is copy and pasted into a new column. That works
great but when I try to loop it so that it finds the next word to copy
and paste it pastes right over the old one. It also just keeps running
forever. It just keeps looping. So hopefully I can get some help from
you geniuses.

Dim y As Integer
Dim rng1 As Range
For y = 1 To 30 Step 4
With Worksheets(1).Range("a1:a500")
Set c = .Find("Item # 2", LookIn:=xlValues)
If Not c Is Nothing Then
Do
Range(c.Offset(0, 0), c.Offset(3, 1)).Copy
Range(Cells(y, 3), Cells(y, 4)).PasteSpecial

Set c = .FindNext(c)
Loop While Not c Is Nothing And c.Address < firstAddress <----
not sure if neccesary its what was in the help.

End If
End With
Next
End Sub

 
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
How can I hide unused file types from file types list in save dial Estra Q Excel Discussion (Misc queries) 1 December 17th 09 12:36 PM
Excel 2007 error "some chart types cannot be combined with other chart types. Select a different chart types" roadsidetree Charts and Charting in Excel 15 June 2nd 09 10:53 AM
For next loops Kate Excel Discussion (Misc queries) 5 May 22nd 06 01:11 PM
help with loops Rick B[_6_] Excel Programming 8 January 28th 04 12:32 AM
Loops PaulSinki Excel Programming 3 December 10th 03 05:01 PM


All times are GMT +1. The time now is 10: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"