Hi Guys,
I have the following part of code
It counts rows after the word "Date" is found
the problem i have is that it counts some ugly text after the dates, which is what i dont need
is there a way to enter a blank line after the dates have been counted?
the code is
Thanks
I have the following part of code
It counts rows after the word "Date" is found
the problem i have is that it counts some ugly text after the dates, which is what i dont need
is there a way to enter a blank line after the dates have been counted?
the code is
Code:
Set keywordCell = .Cells.Find(What:="Date")
If Not keywordCell Is Nothing Then
'Count the rows of Match Stats
rows = 0
Do While keywordCell.Offset(rows + 1, 0).Value <> ""
rows = rows + 1
Loop
If rows > 0 Then
'Copy the rows and 3 columns of Match Stats from web query sheet to Data sheet
'using copy/paste special/values only
.Range(keywordCell.Offset(1, 0), keywordCell.Offset(rows, 2)).Copy
dataSheet.Range(URLcell.Offset(0, 1).Value).PasteSpecial Paste:=xlPasteValues
Application.CutCopyMode = False
End If
Else
MsgBox "Unable to extract Match Stats for " & URLcell.Value & " because the data returned by the web query " & _
"doesn't contain the word 'Date' which should mark the start of the Match Stats data"
End If
Thanks