Hello
I have a macro that copies unique values from one sheet to another.
It works ok but I need to add a condition so that it only copies the values if another cell on the same row as each value contains the word "Absent".
Is this possible? Any help would be appreciated.
Thank you
I have a macro that copies unique values from one sheet to another.
It works ok but I need to add a condition so that it only copies the values if another cell on the same row as each value contains the word "Absent".
Is this possible? Any help would be appreciated.
Thank you
VBA Code:
Sub CopyIDs()
Dim lastrow As Long
lastrow = ThisWorkbook.Sheets("StudentIDs").Cells(Rows.Count, "A").End(xlUp).Row
ThisWorkbook.Sheets("StudentIDs").Range("A2:A" & lastrow).AdvancedFilter _
Action:=xlFilterCopy, _
CopyToRange:=ThisWorkbook.Sheets("Summary").Range("A55"), _
Unique:=True
End Sub