Hi all, I have a macro in place but it is very sluggish.
When i exit a specific sheet (Sheet 3), I would like the values in columns K,L and M to be fixed if the corrosponding row value in column H is "Y".
I have the below code but as mentioned it is very time consuming and freezes the screen when running. if there is a better way please could someone assist?
Private Sub Worksheet_Deactivate()
Application.ScreenUpdating = False
Sheet3.Unprotect
Dim lRow As Long, lCounter As Long
lRow = Cells(Rows.Count, 1).End(xlUp).Row
For lCounter = 2 To lRow
If Cells(lCounter, 8) = "Y" Then
With Cells(lCounter, 11).Resize(1, 3)
.Value = .Value
End With
End If
Next lCounter
Sheet3.Protect DrawingObjects:=True, Contents:=True, Scenarios:=True _
, AllowFiltering:=True,
Application.ScreenUpdating = True
End Sub
Bookmarks