Thanks for the reply. Much appreciated.
I was able to get this to work to automatically trigger when either "Noon in Port" or "Noon in Trans" was detected in the range. Also, as the spreadsheet was being copied, renamed and updated on a daily basis, it had to ignore previous "NOON in PORT" triggers so was looking only at the last value in the range.
I added a couple of other cells to clear contents, this is the code
Code:
Private Sub Worksheet_Change(ByVal target As Range)
Dim triggercells As Range, lrow As Integer
Set triggercells = Range("M4:M53")
If Not Application.Intersect(triggercells, Range(target.Address)) Is Nothing Then
lrow = ActiveSheet.Cells(ActiveSheet.Rows.Count, "M").End(xlUp).Row
If Cells(lrow, 13).Value = "NOON in PORT" Then
Range("I5,E4:F4,E5:F5").Select
Range("E5").Activate
Selection.ClearContents
End If
If Cells(lrow, 13).Value = "NOON in TRANS" Then
Range("I5,E4:F4,E5:F5").Select
Range("E5").Activate
Selection.ClearContents
End If
Range("j13").Select
End If
End Sub
Thanks again
Bookmarks