Data validation not working

exceluser2007

Active Member
Joined
Nov 21, 2007
Messages
365
Hi All,

I can't understand why this Data validation is not working.

In A4 I have the value '2008', with the name FIN_year.

Also A1 = FIN_year.

I want to validate A1 to only keep the value of FIN_year.

So in Data Validation I set in:
Settings:
Allow: Custom
Formula: =INDIRECT(FIN_year) [I also tried just '=FIN_year').

In Error Alert:
I ticked the "Show error alert after invalid data is entered"
Style: Stop
Title: Error, wrong Data is entered
Error message: This value is equal to FIN_year

Then clicked OK.

However when I try to overwrite the value in A1, it allows me to put in invalid values without any error warning.

Could anyone kindly explain how to correct this problem.

regards,
 

Excel Facts

How to change case of text in Excel?
Use =UPPER() for upper case, =LOWER() for lower case, and =PROPER() for proper case. PROPER won't capitalize second c in Mccartney
PATSYS,

Thanks for your helpful suggestion. Yes, that only allows for one entry to be entered.

However I don't want it to display a drop down arrow (the user shouldn;t feel there are more entries, and also because what I was trying should work in principle).

Any ideas to correct or explain why the custom formula is not being validated.

Regards
 
Upvote 0
Why do you want the user to enter this value, if there is only one choice ?
The formula =FIN_year should work fine.
It seems to me that what you want is to protect this formula from beeing changed by the user. Then you should use cell protection, not datavalidation.
 
Upvote 0
PATSYS,

However I don't want it to display a drop down arrow (the user shouldn;t feel there are more entries, and also because what I was trying should work in principle).

Regards

If you don't want the arrow to appear, uncheck the In-cell dropdown checkbox in the SETTINGS tab of the Data Validation window.
 
Upvote 0
Hi PATSYS, mike2008, Bjornar,

Thanks you for your great tips!

I didn't know about preventing the drop down list functionality, works well for a single value.

Bjornar, I looked into the cell protection functionality as you suggested. It is quite helpful, but requires the entire worksheet to be protected first (to my understanding). The option above seems easier for a handful of cells to protect.

Again thankyou all for your help.
 
Upvote 0
Using datavalidation will not prevent the user for replacing your formula with the value '2008'. I guess you have a reason for using a formula in this cell, and not just put in the value '2008'. Pasting something on a cell with validation, will also wipe out the validation.

Worksheet protection is great, for preventing users from changing cells containing formulas. As default all cells is locked, so what you do is to unlock only the cells that you want the user to enter values in. Keep all other cells locked. So when you use worksheet protection, dont try to figure out which cells too lock. Instead figure out what cells to leave unlocked, and leave all other cells locked.

In Excel 2002 and newer version you can choose if you want the user to be able to select locked cells or not. If you choose not to let them select locked cells, this will make the navigation easier for the user, as they now can TAB thru the cells they are supposed to enter values in. When the user enters a value, and press ENTER, Excel jumps to the next unlocked cell.
If you want them to be able to copy from locked cells (but not change them) you must allow them to select locked cell.

In most cases I don't bother with entering a password for protection the sheet. If the user wants to unprotect the sheet, he probably has a good reason to do this, and knows what he is doing. A password can easily be broken too.
 
Upvote 0

Forum statistics

Threads
1,215,698
Messages
6,126,270
Members
449,308
Latest member
VerifiedBleachersAttendee

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