LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 100
Default Excel VBA loop until eof

Wombatz

Try this.

Tony

Sub bbb()
With Columns("a:a")
Set c = .Find("define")
If Not c Is Nothing Then
firstaddr = c.Address
For i = 0 To 7
Range(c.Address).Offset(i, 2).Value = c.Value
Next i
Set c = .FindNext(c)
While Not c Is Nothing And c.Address < firstaddr
For i = 0 To 7
Range(c.Address).Offset(i, 2).Value = c.Value
Next i
Set c = .FindNext(c)
Wend
End If
End With
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
Find loop doesn't loop JSnow Excel Discussion (Misc queries) 2 June 24th 09 08:28 PM
Loop in Excel Mike Excel Discussion (Misc queries) 1 January 10th 08 05:35 PM
VB for excel, how do I loop through code steve hobden via OfficeKB.com Excel Discussion (Misc queries) 2 June 9th 05 01:59 PM
Loop within Excel Formula? Dan[_29_] Excel Programming 3 December 23rd 03 10:26 PM
HELP!!!! Can't stop a loop (NOT an infinite loop) TBA[_2_] Excel Programming 3 December 14th 03 03:33 PM


All times are GMT +1. The time now is 06:27 AM.

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"