Run macro when cell vaule in a range changes

Tom-Ronny

New Member
Joined
Dec 13, 2013
Messages
6
How could one start a macro when a cell value within a range is updated/changed?

The challenge is that i have a fairly big matrix of 800 rows times 365 collumns which contain a macro to check column by column for double entry and change the background of the cell if it exist. This is way to heavy to have running non stop, so a better way would be to have the macro run for a spesific column whenever a value in that column is changed.


Anyone have a good idea to how this could be solved? and maybe a code that would handle this variation? I have found many examples of how to do this when a single cell is cahnged, but this would need to look at a given matrix instead.



Thanks for any help :)
 
Thanks Sixthsense, but the conditional formating is (as far as I feel) limited to smaller ranges. I have tried the conditional formating on this and it does not give me the options I need, much due to some challenges as I have pointed out in my other thread.
 
Upvote 0
Set the matrix area as a named range then use the Worksheet_Change event to look for an Intersect between the named range and the Target cell of the event. I.e. if you set then named range as "Test_Area" then the code (in the SHEET CODE Module, not a standard code module) would be:

Rich (BB code):
Private Sub Worksheet_Change(ByVal Target As Range)
If Not Intersect(Range("Test_Area"), Target) Is Nothing Then
    MsgBox "I've changed in the Range" 'this is where you put your code
End If
End Sub
 
Upvote 0

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