PDA

View Full Version : Return true to a cell if a range has been altered



Rejje
05-27-2011, 02:41 AM
Hi!
I'm need a specific cell to show "True" if a one has done some altering of values in a range.

How is it done?

Bob Phillips
05-27-2011, 03:41 AM
You could use a worksheet event, something like



Private Sub Worksheet_Change(ByVal Target As Range)
Const WS_RANGE As String = "H1:H5" '<<<< change to suit

On Error GoTo ws_exit

Application.EnableEvents = False

If Not Intersect(Target, Me.Range(WS_RANGE)) Is Nothing Then

'do stuff ... and then

Me.Range("M1").Value = True
End If

ws_exit:
Application.EnableEvents = True
End Sub