is there such an event as cell change

hitch_hiker

Active Member
Joined
Feb 21, 2012
Messages
294
I need to do data manipulation based on a particular cell being changed, I can try to work it on sheet change , but cell change would be a lot easier, if it is possible , please advise correct syntax also best location to put the code
 

Excel Facts

Create a chart in one keystroke
Select the data and press Alt+F1 to insert a default chart. You can change the default chart to any chart type
The usual way to restrict the sheet's change event to particular cells is
Code:
Private Sub Worksheet_Change(ByVal Target As Range)
    If Not Application.Intersect(Target, Range("C10:C16")) Is Nothing Then
        Rem do stuff
    End If
End Sub

Note that if you copy paste, Target might be more than one cell
 
Upvote 0
Here's something you can start with..

On the sheet you want to do this action, Right click it's Tab - View code.
Paste the following there.

Code:
Private Sub Worksheet_Change(ByVal Target As Range)
Dim MyRange As Range, c As Range
Set MyRange = Intersect(Target, Range("C10:C16"))
If MyRange Is Nothing Then Exit Sub
Application.EnableEvents = False
For Each c In MyRange
    c.Offset(0, 1).Value = "Cell " & c.Address & " was just changed"
Next
Application.EnableEvents = True
End Sub
 
Upvote 0
thanks Mike, so it's a sheet change but only if in the range, why the private sub?, does that make a difference.
 
Upvote 0
thanks Jon,
I might be biting much more than I can chew, but it's the finishing touch for my project
 
Upvote 0

Forum statistics

Threads
1,213,528
Messages
6,114,154
Members
448,553
Latest member
slaytonpa

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top