Hi,
Column A has a list of three letter codes placed in each cell and is periodically updated.
The Sub Procedure below is designed to check the most recently added code against the codes already on the list. If the code is the same as any added before then it is deleted from the list. When the Sub Procedure is executed a Mismatch Error occurs at the part of the underlined statement.
Please will someone show me where I am going wrong .
Thanks,
Rob
Column A has a list of three letter codes placed in each cell and is periodically updated.
The Sub Procedure below is designed to check the most recently added code against the codes already on the list. If the code is the same as any added before then it is deleted from the list. When the Sub Procedure is executed a Mismatch Error occurs at the part of the underlined statement.
Please will someone show me where I am going wrong .
Code:
Sub Check_for_previous_occurance_of_code()
Sheets("User Interface").Select
Range("a9").End(xlDown).Select
[U]If Selection.Value = Range(Selection.Offset(-1, 0), Selection.End(xlUp)).Value[/U] Then Selection.ClearContents
End Sub
Rob