Data Validation Error Alert not Working

mvancleave

Board Regular
Joined
May 28, 2007
Messages
97
I have applied data validation to certain columns based on named ranges in another sheet.

Data/Validation Select "List" Source =NamedRange

I have selected the "Show error messages ... " box and added message text, but the alert does not come up when invalid data are entered.

The ranges are defined dynamically using the offset and counta functions. When I define the names statically, everything works fine.

What can I do to fix this, short of using static name defintions?

Thanks,

Mike
 

Excel Facts

Copy formula down without changing references
If you have =SUM(F2:F49) in F50; type Alt+' in F51 to copy =SUM(F2:F49) to F51, leaving the formula in edit mode. Change SUM to COUNT.
Works just fine for me using a dynamic named range on another sheet.

Are you certain the data being entered is invalid?
I select a value from the list with no problems, but if I enter a value not contained in the list, the error appears.

If you manually enter a value that is contained in the dynamic range, it will be accepted since the value is in the list (capitalization doesn't appear to matter).
 
Upvote 0
I'm sure that data is invalid, and I don't get the error message. This is with Excel 2000, so maybe that makes a difference. I can check on my computer at home (Excel 2003) and see if the same problem happens there.
 
Upvote 0
Ok, so this is interesting. Here is how I had my dynamic range defined.

First, i have a cell named RangeCount that counts the entries in the range (COUNTA = ), then my range definition refers to this named cell for the offset. If I enter the COUNTA directly in the range definition, the error message works. It must have something to do with the order in which excel is counting things. Hmm ...
 
Upvote 0
Ok, so I went and named all of my validation lists with static names and now I can't get any stop alert messages. There is something else wrong.

Any ideas?
 
Upvote 0
Posting your formulas and the data types will help us help you much faster.

Or, follow this example:-

Name:- Lrow
Formula:- =MATCH(REPT("z",255),Sheet1!$A:$A)

Name:- rng_List
Formula:- =INDEX(Sheet1!$A:$A,2):INDEX(Sheet1!$A:$A,lRow)

Data/Validation/List/=rng_List

Note: Becareful when using COUNTA for dynamic ranges. If you have blanks in the range the dynamic formula will fail. The above method of using MATCH is my preference because it allows for blanks.
 
Upvote 0
Well, you hit the nail on the head. I had included a blank in the range, which was the glitch. The dropdowns had the right data in them, but the no error message.

Clever way to find the last row with the REPT function! The significance of the "z" makes sense, but is there a significance to the 255 or is it just a big number to ensure enough "z" to shove it to the end of the list?

Lastly, would you consider combining the to formulas? What would be the negative ramifications?

=INDEX(Sheet1!$A:$A,2):INDEX(Sheet1!$A:$A,MATCH(REPT("z",255),Sheet1!$A:$A))

Thanks!

Mike
 
Upvote 0
Clever way to find the last row with the REPT function! The significance of the "z" makes sense, but is there a significance to the 255 or is it just a big number to ensure enough "z" to shove it to the end of the list?

Lastly, would you consider combining the to formulas? What would be the negative ramifications?

To answer your first question, yes.

To answer your second question, probably doesn't matter. I define lRow separately because I usually use it somewhere else. I suppose it doesn't matter in your case.

FYI, I first saw this method from Aladin Akyurek.
 
Upvote 0
Thanks Guys, you helped a lot when I ran across this same issue. Found a blank at the end of the table being referenced. Never heard of that being an issue before, and really had me scratching my head.

Thanks again. :)
 
Upvote 0
Thanks Guys, you helped a lot when I ran across this same issue. Found a blank at the end of the table being referenced. Never heard of that being an issue before, and really had me scratching my head.

Thanks again. :)


Thank you! I had the same problem with the error alert not popping up when I entered invalid data. Deleted the blank rows in my reference table and data validation warning worked once again.
 
Upvote 0

Forum statistics

Threads
1,224,270
Messages
6,177,574
Members
452,784
Latest member
talippo

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