Help!
I have not had this problem before, but my macro is now copying over the current data instead of appending in the next empty row.
I need this to look at the date (today), if the data is already there, do nothing. If not today then take the data and place each instance in the next available row.
This copies multiple rows that match the criteria, but now it is overwriting the data already present in the worksheet("Workable").
I cannot figure out what is going on!
DThib
I have not had this problem before, but my macro is now copying over the current data instead of appending in the next empty row.
I need this to look at the date (today), if the data is already there, do nothing. If not today then take the data and place each instance in the next available row.
This copies multiple rows that match the criteria, but now it is overwriting the data already present in the worksheet("Workable").
Code:
Sub Wordie()
Dim LastRow, LR As Long
Dim i As Long
Dim j As Long
Sheets("Workable").Activate
LastRow = Cells(Rows.Count, "B").End(xlUp).Row + 1
j = 2
For i = 1 To LastRow
If Sheets("Initial Query").Cells(i, 29) <> "" And Sheets("Initial Query").Cells(i, 11) = _
"Assigned" And Sheets("Initial Query").Cells(i, 16) = "" Then
Sheets("Workable").Cells(j, 2) = Sheets("Initial Query").Cells(i, 2).Value
Sheets("Workable").Cells(j, 3) = Sheets("Initial Query").Cells(i, 10).Value
Sheets("Workable").Cells(j, 4) = Sheets("Initial Query").Cells(i, 9).Value
Sheets("Workable").Cells(j, 5) = Sheets("Initial Query").Cells(i, 29).Value
Sheets("Workable").Cells(j, 6) = Sheets("Initial Query").Cells(i, 5).Value
Sheets("Workable").Cells(j, 7) = Sheets("Initial Query").Cells(i, 6).Value
Sheets("Workable").Cells(j, 8) = Sheets("Initial Query").Cells(i, 30).Value
Sheets("Workable").Cells(j, 9) = Sheets("Initial Query").Cells(i, 8).Value
j = j + 1
End If
Next i
End Sub
I cannot figure out what is going on!
DThib
Last edited: