This is an old post, but I found a solution that will throw an error AND prevent peeps from entering whatever they want (using Excel 2010) without using VBA.
On the user interface (SHEET1), I have the following fields:
- Field 1 is a Yes/No Validation Dropdown list.
- Field 2 is a percent validation Dropdown list with values of 1% - 100%.
What I needed:
When "Yes" is selected, I can choose or type 1%-100% in field 2. It is also "available".
When "No" is selected, field 2 becomes "grayed out" and user can no longer enter some random value.
How I did it:
For field 2, I used a Conditional Formatting (formula of ='SHEET2'!$I$2="No") and set it to gray out the font and background.
In SHEET2, I set a field (column I) to equal field 1 from SHEET1, so it's either "Yes" or "No" depending on what's selected in field 1 from SHEET1. I then simply added 99 other rows beneath it, setting them equal to the cell immediately above it. So I have a 100 rows of "Yes" or "No".
In SHEET2, I have another column (R) with the first cell value of: =IF(I2="Yes", 0.01, 1)
Immediately below it, I have: =IF(I3="Yes", R2+0.01, 1)
I then prefill the values down the rows below it until I have 1% throuh 100% (when "Yes" is selected) and set the validation on SHEET1's field 2 to be based on these values. This allows me to manually enter a % value, or select from the dropdown values 1% through 100%.
Results:
When I select "No", it grays out field 2, and leaves the % whatever it was before because it can't change the displayed value without VBA. For example, it might still show 30%. However, if the user sees it grayed out and attempts to type some value in it, like 31%, it'll throw an error since I set an ERROR on the "Error Alert" tab in Data Validation for this field. If they choose the dropdown, they just see like 100 options of 100%. This is the only downside, but I guess I could have just blanked out everything except 1 single field showing 100%.
When I choose "Yes", it ungrays field 2, and I am free to choose from the doprdown list values between 1-100 again.
What I needed to do with the values:
For whatever it is I need to accomplish, I set some formula I'm using based on 100% if "No" is selected and field 2's % if "Yes" is selected.