I have the following macro that will copy data from wbSrc to wbDest.
I need help in modifying this to ensure that
1. this will only copy data if the column F is equal to "Valid"
2. This will not copy duplicate (based on column B which is the job number)
I need help in modifying this to ensure that
1. this will only copy data if the column F is equal to "Valid"
2. This will not copy duplicate (based on column B which is the job number)
VBA Code:
Sub copyfeedback()
Dim WbSrc As Workbook
Dim wbDest As Workbook
' set report workbook to workbook object (works only is the file is already
'open)
Set wbDest = ThisWorkbook
Application.ScreenUpdating = False
' open the source workbook and select the source sheet
Set WbSrc = Workbooks.Open(filename:="C:\Users\Tutorial\Desktop\Work\Feedback Tracker.xlsx")
' copy the source range and paste in 1 line , paste at "C3:E9"
WbSrc.Sheets("Sheet1").Range("A3:I9").Copy
wbDest.Sheets("Feedback").Range("A3:I9").PasteSpecial xlPasteValues
WbSrc.Close False
'wbDest.Save
Application.ScreenUpdating = True
End Sub