Help!
I am getting some but not all matches with criteria match for data that gets copied and pasted from one Sheet to another.
The following code fires as needed, but I can count the number of misses.
This starts with the Access Database Query with the target data is opened and updated to be copied to a sheet in my workbook. The new data should be scanned for criteria and the matching row copied as shown.
What is going on?
DThib
I am getting some but not all matches with criteria match for data that gets copied and pasted from one Sheet to another.
The following code fires as needed, but I can count the number of misses.
This starts with the Access Database Query with the target data is opened and updated to be copied to a sheet in my workbook. The new data should be scanned for criteria and the matching row copied as shown.
What is going on?
Code:
Sub Workie()
Dim LastRow, LR As Long
Dim i As Long
Dim j As Long
LastRow = Cells(Rows.Count, "B").End(xlUp).Row
j = LastRow + 1
For i = 1 To LastRow
If Sheets("Initial Query Pull").Cells(i, 29) <> "" And Sheets("Initial Query Pull").Cells(i, 11) = _
"Assigned" And Sheets("Initial Query Pull").Cells(i, 16) = "" Then
Sheets("Workable").Cells(j, 1) = Format(Now(), "DD-MMM-YYYY")
Sheets("Workable").Cells(j, 2) = Sheets("Initial Query Pull").Cells(i, 2).Value
Sheets("Workable").Cells(j, 3) = Sheets("Initial Query Pull").Cells(i, 10).Value
Sheets("Workable").Cells(j, 4) = Sheets("Initial Query Pull").Cells(i, 9).Value
Sheets("Workable").Cells(j, 5) = Sheets("Initial Query Pull").Cells(i, 29).Value
Sheets("Workable").Cells(j, 6) = Sheets("Initial Query Pull").Cells(i, 5).Value
Sheets("Workable").Cells(j, 7) = Sheets("Initial Query Pull").Cells(i, 6).Value
Sheets("Workable").Cells(j, 8) = Sheets("Initial Query Pull").Cells(i, 30).Value
Sheets("Workable").Cells(j, 9) = Sheets("Initial Query Pull").Cells(i, 8).Value
j = j + 1
End If
Next i
End Sub
DThib