I want to create a macro so whenever a cell in column E changes to "Done" it runs the macro.
currently I have this so whenever a cell changes in column E it runs so that caused a never ending loop then crashes...
am I able to set this up to only run when it changes to "done"
the problem I see is it filters the data so the cells change again.... causing it to run again...
Any ideas?
currently I have this so whenever a cell changes in column E it runs so that caused a never ending loop then crashes...
am I able to set this up to only run when it changes to "done"
the problem I see is it filters the data so the cells change again.... causing it to run again...
Any ideas?
VBA Code:
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Not Intersect(Target, Range("E:E")) Is Nothing Then
ActiveWorkbook.Worksheets("Notes").ListObjects("Table2").Sort.SortFields.Clear
ActiveWorkbook.Worksheets("Notes").ListObjects("Table2").Sort.SortFields.Add( _
Range("Table2[Status]"), xlSortOnFontColor, xlDescending, , xlSortNormal). _
SortOnValue.Color = RGB(208, 206, 206)
With ActiveWorkbook.Worksheets("Notes").ListObjects("Table2").Sort
.Header = xlYes
.MatchCase = False
.Orientation = xlTopToBottom
.SortMethod = xlPinYin
.Apply
End With
End If
End Sub