Hi All,
Im currently using this code that cuts off a record from Tab 'FollowUp' if there exists a unique identifier in column B and if a 'No' exist in Column M and pastes in Tab 'Test' with a date format but just realized that Column B records are not always unique and when similar they're separated by the record in Col A.
I need it to cut the record if Col M is 'No' AND to consider the records in Col A if records in Col B are similar and paste in Tab 'Hold"
I know Ive to add that code after the "If IsError" line of the code but just dont know how since Im very new to VB but planning to start working on it.
Anyone could recommend the code change required here.
Im currently using this code that cuts off a record from Tab 'FollowUp' if there exists a unique identifier in column B and if a 'No' exist in Column M and pastes in Tab 'Test' with a date format but just realized that Column B records are not always unique and when similar they're separated by the record in Col A.
I need it to cut the record if Col M is 'No' AND to consider the records in Col A if records in Col B are similar and paste in Tab 'Hold"
I know Ive to add that code after the "If IsError" line of the code but just dont know how since Im very new to VB but planning to start working on it.
Anyone could recommend the code change required here.
Code:
Dim LastDate As Date
For intCounter = 2 To intNoLinesFollowUp
If Cells(intCounter, 13).Value = "No" Then
If IsError(Application.Match(Cells(intCounter, 2), Sheets("Test").Columns("B"), 0)) Then
Rows(intCounter).Cut Destination:=Sheets("Test").Range("A" & Rows.Count).End(xlUp).Offset(1)
Sheets("Test").Range("R" & Rows.Count).End(xlUp).Offset(1).Value = Format(Date, "mm/dd/yy")
End If
If IsDate(Sheets("Test").Range("R" & Rows.Count).End(xlUp).Value) Then
LastDate = Sheets("Test").Range("R" & Rows.Count).End(xlUp).Value
Else
LastDate = Date
End If