Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
How can I hide unused file types from file types list in save dial | Excel Discussion (Misc queries) | |||
Excel 2007 error "some chart types cannot be combined with other chart types. Select a different chart types" | Charts and Charting in Excel | |||
For next loops | Excel Discussion (Misc queries) | |||
help with loops | Excel Programming | |||
Loops | Excel Programming |