Question : Best way to make users stay within ranges and warn users of conflicts


I am usually pretty confident about working with Excel and making it do what I need to do, but this one has been on my mind, off and on, for the past 2 years.  Maybe someone has already done this, but I cannot find an example.

We have spreadsheets that define a person's territories.  Their territories are based on a range of miles of a specific road... for example, I-35 is a road name.  For our purposes, the territories on I-35 start at Mile 5 (not zero) and end at mile 120.  My territory can be miles 49-99, while another person covers from mile 5 - 48.99, and a different person covers from 99.01 - 120.  

Many of my users assume the territory range for I-35 is mile 0 - 120, but as stated above, it is 5 - 120.  

I need to set a range and make it to where the user themselves cannot change that range (but I can).  Then, in a different set of cells, the users can change the miles on their territories, but if they try to set a range that is not valid get a warning it is not correct (ie if a user tries to set mile 0 on I-35, when there is none).

There may be another issue to address, but this would help me get started.

Thank you!

Answer : Best way to make users stay within ranges and warn users of conflicts

Yes, data validation will do it.

1. Click Data --> Validiation
2. In the Allow box select Decimal
3. In the Minimum enter 5 and in the Maximum enter 120
4. Click the Error Alert tab and in the Title enter: "Mile Range Invalid" and in the Error Message enter: "You have entered an invalid mile range.  Please enter a value between 5 and 120."

See attached example for how it works.  Try entering an invalid range in cell A2 and you'll get the custom error message listed above.
Random Solutions  
programming4us programming4us