Change in a Range

ManUBlueJay

Active Member
Joined
Aug 30, 2012
Messages
302
Office Version
  1. 2016
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

Back into an answer in Excel
Use Data, What-If Analysis, Goal Seek to find the correct input cell value to reach a desired result
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,214,651
Messages
6,120,744
Members
448,989
Latest member
mariah3

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