I'm very novice when it comes to VBA, and have been struggling setting some data validation and having it adjust the users input.
I have 3 columns, on columns I, J, and K with 36 rows where a user can input numbers. The value in column I, must fall between the values in J and K. The value in J must be less than or equal to K, and thus inversely, the value in K must be greater than J.
To add a 3rd twist, the difference between the values of K and J must not exceed 7,200.
The tricky part is it needs to work regardless of what column the user inputs values first.
I have this for loop with if statements that frequently crashes Excel. This code is in the Worksheet_Change event handler.
The first 2 If statements work fine, it does what is intended by ensuring the value in column I always false between J and K and automatically adjusting them if the value in I changes.
Where I'm struggling is with the latter part of the code which is where the crashing is happening.
Any help would be greatly appreciated.
Bookmarks