fari1
Active Member
- Joined
- May 29, 2011
- Messages
- 362
i've a loop code, that stops after the last used cell, i want to modify the code to fit in my scenerio, the thing is that i've a web query that brings in data for a range of data in my column A sheet2, in that column i've no.100,200,300 and so on which trigger my worksheet change in sheet1 and bring in web pages, the only source of stopping that loop is when a page is brought in by web query in my sheet1 column A,which says
and this line can be in any row of column A, and i want the loop to stop whenever this line is is shown in the sheet1 column A.
my loop code is
</PRE>
HTML:
<h1>No matching filings.<h1>
and this line can be in any row of column A, and i want the loop to stop whenever this line is is shown in the sheet1 column A.
my loop code is
Code:
Sub loopA()
Dim cel As Range
Dim mySheet As Worksheet
Set mySheet = Sheets("Wquery")
For Each cel In Sheets("data").Range("A" & Sheets("data").Range("A1").End(xlDown).Row & ":A" & Sheets("data").Range("A" & Rows.Count).End(xlUp).Row)
mySheet.Range("A1") = cel.Value
Next cel
End Sub
</PRE>
Last edited: