I am working on a data sheet where I need to copy the complete row when there is 'CR' or 'blank' data in Column 'C' (Type).
Sheet 1-
Copy the same above data row when there is 'CR' in Column 'C' (Sheet 1)
The data in the sheet 1 is added/updated regularly, so for e.g. - we have data till yesterday 20/09/14. We ran the macro on 20/09/14. It will give us the result of upto 20/09/14 and the same will be copied in the Sheet 2.
VBA Code
If we add more data in sheet 1 after 20/09/14; then it should pickup all the cells where data is added after that date e.g. 21/09/14 onwards and copy the data in the new sheet. But currently it's again copying all the data again means the data of 20/09/14 and lateron data.
Could some one help me to change the above VBA code to do the above task.
Thanks,
RT
Sheet 1-
Code:
Account Date Type Narrative Value Date Payments Reciepts
300002-0113 20/09/2014 CHQ TFR 300002 5
300002-0113 21/09/2014 CR 10
22/09/2014 DR TFR 300002 50
300002-0113 23/09/2014 CHQ 100
22/09/2014 TFR 300002 30
300002-0113 21/09/2014 CR TFR 300002 10
Copy the same above data row when there is 'CR' in Column 'C' (Sheet 1)
The data in the sheet 1 is added/updated regularly, so for e.g. - we have data till yesterday 20/09/14. We ran the macro on 20/09/14. It will give us the result of upto 20/09/14 and the same will be copied in the Sheet 2.
VBA Code
Code:
Sub cr()
Dim i As Long
For i = 2 To Range("C" & Rows.Count).End(3).Row
If Cells(i, 3) = "CR" Or Cells(i, 3) = "" Then
Rows(i).Copy Sheets("UNCLEARED & QUERY ITEMS").Range("A" & Rows.Count).End(3)(2)
End If
Next i
End Sub
If we add more data in sheet 1 after 20/09/14; then it should pickup all the cells where data is added after that date e.g. 21/09/14 onwards and copy the data in the new sheet. But currently it's again copying all the data again means the data of 20/09/14 and lateron data.
Could some one help me to change the above VBA code to do the above task.
Thanks,
RT