S
Shaz
Hello
The code below does almost what I want - identifying words within a
sheet. I would like however to copy the entire row to Sheet2 when
found - can someone help with the coding?
Thanks in advance
Sub FindCode()
Dim astrList(5) As String
Dim lngUpperBound As Long
Dim strText As String
Dim lngIndex As Long
Dim lngRow As Long
'set the upperbound of the array
'(number of words it'll contain)
lngUpperBound = 3
'add words to the array
astrList(0) = "boB"
astrList(1) = "George"
astrList(2) = "woRd"
astrList(3) = "match?"
astrList(4) = "YES"
'look for any matches in col1
For lngRow = 10 To 100
strText = UCase(ActiveSheet.Cells(lngRow, 1).Value)
For lngIndex = 0 To lngUpperBound - 1
If UCase(astrList(lngIndex)) = strText Then
'I can't get the following line to work
EntireRow.Copy
Sheets("Sheet2").Range("A65000").End(xlUp).Offset(1, 0)
End If
Next
Next
End Sub
The code below does almost what I want - identifying words within a
sheet. I would like however to copy the entire row to Sheet2 when
found - can someone help with the coding?
Thanks in advance
Sub FindCode()
Dim astrList(5) As String
Dim lngUpperBound As Long
Dim strText As String
Dim lngIndex As Long
Dim lngRow As Long
'set the upperbound of the array
'(number of words it'll contain)
lngUpperBound = 3
'add words to the array
astrList(0) = "boB"
astrList(1) = "George"
astrList(2) = "woRd"
astrList(3) = "match?"
astrList(4) = "YES"
'look for any matches in col1
For lngRow = 10 To 100
strText = UCase(ActiveSheet.Cells(lngRow, 1).Value)
For lngIndex = 0 To lngUpperBound - 1
If UCase(astrList(lngIndex)) = strText Then
'I can't get the following line to work
EntireRow.Copy
Sheets("Sheet2").Range("A65000").End(xlUp).Offset(1, 0)
End If
Next
Next
End Sub