Hi,
I currently have an auto commenter "ME RELATED" based on if the cell has contents that is below the input date or does not have "CCY". However i want to amend the condition such that it will not comment if the selected cell will CONTAIN CCY somewhere in the cell.
Thanks for your help
Public Sub ME1_comment(Date_Ref As Date)
Dim c_ell As Range, S_heet As Worksheet
For Each S_heet In ActiveWorkbook.Sheets
If S_heet.Visible = xlSheetVisible And S_heet.Name <> "Cash Summary" Then
S_heet.Select
For Each c_ell In Range("N23", Cells(Rows.Count, 23).End(xlUp))
If IsDate(c_ell) And c_ell.Offset(0, 25) <> "CCY" Then
If c_ell <= Date_Ref Then
c_ell.Offset(0, -12) = "ME RELATED"
c_ell.Offset(0, -12).Font.ColorIndex = 3
c_ell.Offset(0, -12).Font.Bold = True
End If
End If
Next c_ell
End If
Next S_heet
End Sub
Bookmarks