Hello Everyone,
I want to use the code below as it does exactly what I want it to do but the problem is that whenever there is a change
to the page the undo option does not work (using the undo icon)? is there any way to modify this code so
that undo will still be enabled? I am running it on Excel 2010.
Thank you in advance for any help.
Code as follows:
I want to use the code below as it does exactly what I want it to do but the problem is that whenever there is a change
to the page the undo option does not work (using the undo icon)? is there any way to modify this code so
that undo will still be enabled? I am running it on Excel 2010.
Thank you in advance for any help.
Code as follows:
Code:
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Dim i, LastRow, tSum
LastRow = Range("K" & Rows.Count).End(xlUp).Row
For i = 1 To LastRow
If Cells(i, "K").Interior.ColorIndex = 15 Then
tSum = tSum + Cells(i, "K").Value
End If
Next
Range("X37").Value = tSum
End Sub