I Should be able to edit any text updated except , "Posted", "Closed" in J Column. Every time I edit the text the date should be auto updated in next column cell. For example, I need to change text "Obsolete" in J3 Column tomorrow and tomorrow date should be updated in L3 cell as before cell K3 is occupied with today's update (Below is the code )
Private Sub Worksheet_Change(ByVal Target As Range)
Dim x As Integer
x = 2
With Sheets("sheet2")
.Unprotect "test"
.Cells.Locked = False
End With
For x = 2 To 32
If WorksheetFunction.CountA(Range(Cells(x, 1), Cells(x, 10))) <> 0 And Cells(x, 11).Value = "" Then
Cells(x, 11).Value = Date
Else: GoTo ende
End If
ende:
Next x
Call nottoday
End Sub
Sub nottoday()
For x = 2 To 32
If IsDate(Cells(x, 11).Value) And Cells(x, 11).Value < Date Then
ActiveSheet.Unprotect Password:="test"
Range(Cells(x, 1), Cells(x, 11)).Locked = True
End If
Next x
Sheets("Sheet2").Protect "test"
End Sub