A family of Microsoft spreadsheet software with tools for analyzing, charting, and communicating data.
... Problem is when I clear the contents in vba it triggers the selection change event again and causes an infinite loop ...
Use EnableEvents to halt processing events while you run your code routine and reenable the event trigger before exiting the function.
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Not Intersect(Target, Range("A:A")) Is Nothing Then
Application.EnableEvents = False
' your code here
Application.EnableEvents = True
End If
End Sub