Change in a Range

ManUBlueJay

Active Member
Joined
Aug 30, 2012
Messages
320
Office Version
  1. 365
Platform
  1. Windows
I am looking for vba code that would Track if a given range changes.
The Worksheet_Change function does not work as it will react if you click into a cell even if you don't change anything.
Example my range is A1:D30
I would like E1 to Say "Changed" when a user changes anything in my range. He would be allowed to click into a cell as long as he does not change it.
 

Excel Facts

Format cells as time
Select range and press Ctrl+Shift+2 to format cells as time. (Shift 2 is the @ sign).
The Worksheet_Change function does not work as it will react if you click into a cell even if you don't change anything.
Worksheet_Change only reacts if a cell is manually updated (regardless of whether the value is changed).
Worksheet_SelectionChange reacts if you just select a cell.

If a user just selects a cells (moves around), Worksheet_Change will not be triggered.
So, are you saying that you users are double-clicking on a cell to get into edit mode, and then NOT changing the value (not sure why they would do that). That would trigger the Worksheet_Change event procedure.

If they are doing that, you will need to capture the cells before value and compare it to the after value.
Here is an old link that shows you how to do that: https://www.mrexcel.com/forum/excel...ba-remember-old-cell-value-before-change.html
Here is another one with various different options: https://stackoverflow.com/questions...-the-old-value-of-a-changed-cell-in-excel-vba
 
Upvote 0

Forum statistics

Threads
1,223,911
Messages
6,175,331
Members
452,636
Latest member
laura12345

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