Welcome to MSDN Blogs Sign in | Join | Help

Your Turn Again – Data Validation

The other night at home, I was doing some work at home, I ran across a situation where I wished that our “Data Validation” functionality and “Pick From List” were integrated – specifically, it would have been really nice if, after I set up Data Validation on a range, Excel recognized when I was typing an entry from the list of valid possible entries.

Here’s an example.  Say I was categorizing some expenses in this Table, and I have set up Data Validation on the last column to make sure I do not mis-categorize any expenses.


If I start typing an entry that is already present above or below the cell I am currently editing (I think Excel looks 25 rows above and below or something like that), like “B” in this case, Excel fills in the rest of the word with the part I didn’t type highlighted in black.  If that’s the word I want, I just have to press Enter, and I am off to the races.  Fewer keystrokes, faster data entry.


However, if I start typing something that is defined in Data Validation as a valid entry, but is not already typed (“Dogs” in this case), I don’t get the highlighting, and I have to type in the entire value before pressing enter.


This could be a bit smoother.  Many of the Data Validation Lists I define have a lot of items (30-50) that can be multiple words, so it would be really handy to get Pick-From-List auto complete – it would make things faster (less typing) and easier (since I wouldn’t have to remember every word of all 50, just the first words).

That led to my next thought about Data Validation – after you type an entry, if the entry is invalid, it erases everything you typed.  For example, if a valid entry was “Home Improvements” and you typed “Home Improvement” and pressed Enter, Excel would alert you that the value was not valid and then delete everything in the cell, leaving you to have to re-type those characters.  It would be nice to be able to just press Cancel and type an “s” instead.

So, while I am at it, here are a number of other things we have heard about Data Validation over the years:

  • It would be nice to have controll over whether things like Copy/Paste, CTRL+Enter, and Fill Down over-wrote data validation.
  • It should be possible to specify data types for the range having Data Validation applied.
  • It should be possible to specify unique values only in a range (rank everything 1-20 …).
  • Two columns can be linked in hierarchical lists (if I choose WA in column 1, only cities in WA should appear in the Data Validation list in column 2).
  • Have an option to sort entries in the drop down.
  • Allow me to reference cells on another sheet without resorting to hacks.
  • Better user control over the error message shown.

So now it is your turn.  What would you like to see added/changed/done to Data Validation?

Published Wednesday, September 27, 2006 6:26 AM by David Gainer

Comments

# re: Your Turn Again – Data Validation

Wednesday, September 27, 2006 10:43 AM by Johan Nordberg
I really like the Data Validation feature. This list of improvments in your post is really good. One thing that I think is missing and that many of my clients want is an option to always show the drop down arrow in Lists so it is more obvious that the cell contains a listbox. That is, dont just show the arrow when the cell is selected.

It would be really good if there was a worksheet function/UDF that would return an array of unique values from a range. I would be useful in many scenarios, including Validation, Lists.

// Johan

# re: Your Turn Again – Data Validation

Wednesday, September 27, 2006 11:55 AM by Bob Umlas
If I use a List and enter Y,N as the possible choices, it is case sensitive, and if the user enters y or n, he gets an alert. To avoid that alert, I need to give the list as Y,y,N,n, which looks a bit stupid. If, on the other hand, I define a range, say xy, which is equal to 2 rows x 1 column, which contains X & Y, then in the validation list I enter =xy, then the case sensitivity is no longer an issue (so I use this way of doing it).  I don't think case sensitivity should interfere, or perhaps there could be a checkbox on the DV form for ensuring case sensitivity or not.

# re: Your Turn Again – Data Validation

Wednesday, September 27, 2006 12:18 PM by Neil
For me, the biggest gripe about Data validation is the fact that it can be over-written by pasting data into the cell.  The same also goes for Conditional Formatting.  

No matter how many times I tell my users to use Paste Special-Values, it's second nature to either hit return to paste a value, or use Ctrl+V.

Features such as validation and CF should be have an option to ensure they can't be pasted over.

Oh, and I'm not sure if this has been revised in Office 07, but the data validation "wizard" in current versions is woeful - it's virtually impossible to edit a custom formula in the 'refers to' box.

# re: Your Turn Again – Data Validation

Wednesday, September 27, 2006 1:02 PM by Orion Adrian
I'd like to be able limit things to classes. For example when I want to say only Whole numbers or only Floating Point numbers I have to also specify ranges. It would be nice if those ranges were optional. It would also be nice to be able to specify only one range when I need to so I can say 0 or greater.

# re: Your Turn Again – Data Validation

Wednesday, September 27, 2006 1:56 PM by A User
I agree with the need to control overwriting of validation, but I would go further...

When a sheet is protected and some cells on that sheet are unlocked there are two things I do not want to have happening to those cells:
1)  changing validation, which defeats the purpose, and
2)  moving the cells, which breaks formulas.

Some folks might like more granular control over these, but I think protection is the right model.  I find it hard to envision a practical scenario where you want to enable these actions on a protected sheet.

# re: Your Turn Again – Data Validation

Wednesday, September 27, 2006 2:58 PM by Francis
Your reference to Washington state reminded me that it would be nice if Excel shipped with additional custom sort lists.

I would like to be able to do a custom sort on a list keyed by one of the following IDs by as many of the others as possible:
- state/province name ("New York)
- postal abbreviation ("NY")
- FIPS/GNIS code (36)
- census regions (1.2)
- federal regions (2 or II)
- EPA regions (2)

These would not require any code changes. You would simply need to add custom sort orders for, say "States by EPA region" or "Postal abbreviations by state."

The same could be done internationally with country names, continents, ISO country 2- and 3-letter codes, and top-level domains; as well as for localized copies of Excel (e.g. provinces.)

This change would make combining and comparing geographic data much easier! Data from different sources often comes keyed and sorted differently, so I end up having to manipulate it to the moon and back or dump it all into a database and run join queries to get each case ("New York") on a line of its own.

# re: Your Turn Again – Data Validation

Wednesday, September 27, 2006 5:06 PM by Dick Kusleika
Go to a blank cell and type Alt+Down and the DV list expands - very handy.  Now start typing "Do" (as a start to Dog in your example) and type Alt+Down - the pick-from-list list drops down rather than the DV list.

I'd like an option to cause the list to expand immediately when the cell is selected, then scroll as the user types.  Start typing "pen" and the list scrolls so you can down arrow to "Pennsylvania".

re hierarchical: You should have an "Indirect" choice in the Allow list.  The user supplies a range and Excel looks for a named range with the same name as the value in the supplied range.  e.g. I enter Indirect and A1.  When A1 says "Ford", Excel looks for the range named Ford and that's the DV list.  When A1 says Toyota, Excel looks for that named range.  Gracefully erroring if the named range doesn't exist, of course.

# re: Your Turn Again – Data Validation

Wednesday, September 27, 2006 5:45 PM by Simon Murphy
control of DV would be good, but the most important thing for me would be that it is reliable and consistent - circle invalid is not really robust enough. DV should validate all the time not just on data entry, it should work on pasted in values, and formulas.
Currently you can paste an invalid value into a cell (without deleting the DV) and it will not fire, likewise formula results can change from valid to invalid and it does not fire.
Circle invalid does not work on protected sheets.
All the usability stuf sounds good, the hierarchical stuff is easy to set up with index/match/offsets already.
I would always use a range name for a validation list so the external sheet thing is not an issue. the no duplicates suggestion is a good idea.
Cheers
Simon

# re: Your Turn Again – Data Validation

Wednesday, September 27, 2006 10:01 PM by Colin Banfield
A few things I'd like to see:

1) Ability to use UDFs directly in Data Validation formulas - like Conditional Formatting formulas allows.

2) An option to specify a certain input syntax. For example [AY6]-[0346], where the the first two characters must be alphabetical and the third must be a number and so on. Also, add specified fixed characters automatically as the user types the entry. In the preceeding example, the square brackets and the hyphen would be added automatically.

3) An option to use a list box. For very long lists, a drop-down list can be unwieldy. The list box can have an option to allow the user to specify the maximun number entries displayed in the list window. The list box window appears when the user clicks a drop arrow on the side of the cell. If the user types in the cell, an AutoComplete drop down can be used to narrow down and select an entry (AutoComplete can also be used for standard drop-down lists).

4) Allow or prevent duplicate entries in a validation range.

# re: Your Turn Again – Data Validation

Thursday, September 28, 2006 1:22 AM by Vic Eldridge
I'm annoyed by the fact that the drop-down arrow button gets drawn in the cell next door, and not in the cell to which the DV is applied.  More often than not there will be another column of data there which then gets partially concealed by the arrow and the average end user gets confused as to which cell the arrow applies to.  

Regards,
Vic Eldridge


# re: Your Turn Again – Data Validation

Thursday, September 28, 2006 2:17 AM by sam
a )Allow List Source to be in another File....
In addition to another sheet (without hacks)

b) Skip Blank Cell Option - When a list range is selected... Blank cells should not appear

c) Remove limit on number of Red Circles (invalid data) on a sheet

d) Improve memory management.
If there are lot of cells having a list validation refereing to the same range of cells - Give an option like the Pivot... "To Optimise memory I will use the same range as in the previos pivot...."
/right now there is a file size bloat if there are too may validated cells...

e) Put a spiner control in addition to the dropdown ... so that the cell displays the next item in the DV list once spinner is clicked

f) Instead of preventing a Copy/Cut PAste on Validated cells...Preserve validation and Run the validation on Paste.
This should let validated data to be pasted and invalid data should be left out...

g)Give Options like - Only Text, Only Numbers, etc...like in Access....rather than having to write a formula in Custom

Dont say .... Thank you for all the wonderful suggestion..we will consider all this in the next version....as we have to ship 2007 in a couple of months....I am sure the world will survive with 2003 for some more time...

Sam

# re: Your Turn Again – Data Validation

Thursday, September 28, 2006 4:00 AM by Stephen Bullen
In order of importance:
- Allow the list source to be a UDF (VBA,XLL or COM)
- Fix the bug with the number of entries in the list being set from VBA causing a crash
- Pasting into it should only paste values
- Case-insensitive
- Ignore blanks in the source list
- Ignore duplicates in the source list
- Add an option such that double-clicking the cell cycles through the DV list entries (just like the VBE Properties window)
- Add regular-expression validation
- Add an event model for BeforeDropDown(Cell), AfterValidate(Cell, Result) etc.
- Fix the bug with DV selections not updating grouped sheets.

Thanks for asking

Stephen Bullen

# re: Your Turn Again – Data Validation

Thursday, September 28, 2006 10:46 AM by David Ringstrom
My number 1 request is being able to store the lists on another worksheet. I can workaround this, but that functionality is out of reach for the average user.

My number 2 request is everything you discussed in your post. :-)

# re: Your Turn Again – Data Validation

Thursday, September 28, 2006 3:43 PM by David Gainer
Thanks everyone for the suggestions - there are lots of good items here.  Sam (and others), I wrote this thinking about the next version, not Excel 2007.  Sorry that wasn't more clear in the post.

# re: Your Turn Again – Data Validation

Friday, September 29, 2006 12:27 AM by sam
Hi David..

I am getting really exited about the blog of the next version (after 2007) of Excel...
All the goodies seem to be coming only later...so is 2007 the teaser....

By the way...isnt XP (2002) the version with the shortest life till date...1 year....we had 2003 coming out pretty soon....

I have a feeling that 2007 is going to beat this record and give way to 2007 1/2...in no time at all....


# re: Your Turn Again – Data Validation

Friday, September 29, 2006 3:09 AM by Biff
The ability to use array constants in custom formulas for both data validation and conditional formatting.

When the list is a range source, include the formatting of the source.

I'm surprised no one mentioned font size! When the sheet zoom is less than 100% the items in the list can be microscopic.

# re: Your Turn Again – Data Validation

Friday, September 29, 2006 9:57 AM by Bob Umlas
How about the ability to control the number of items shown in the dropdown list?

# re: Your Turn Again – Data Validation

Saturday, September 30, 2006 12:09 PM by Hein Rutjes
I noticed a bug when enabling the 'Input Message' feature of data validation. When I selected a cell the yellow balloon with the text poped-up in the correct location. However after I moved the balloon by hand, the balloon stayed on that position on the screen no matter what happened.

It appears the coordinates become relative to the left-top of the Excel window, disregarding scrolling offsets and zoom-factors.

I would make more sense to make the changed balloon position relative to the cell.

Kind regards,
Hein

# re: Your Turn Again – Data Validation

Sunday, October 01, 2006 4:43 PM by John Drummond
DV is nearly great, but its problems are quite deep, as has been mentioned.  It fails to catch all data entry, as the copy and paste example mentioned shows.  Also, in its frequent use as a list-picker combo box, if you change the original category, say to 'Home Enhancements', of course the data cells that refer to that are unable to change.  So whilst at first sight it promises MS Access-like relating of lists, it just can't do the referential integrity.  The other thing that Access famously does is allow you a multi-column combo box where the index is in a zero width hidden column.  I thought this worthy of mentioning, but I don't think there is any answer to the referential integrity issue, unless you could somehow have DV accept the reference to the validating list, instead of the value in that list itself.  Blocking the various routes for cheating DV might be a start, and the idea for a UDF in the criteria is a good one.

# re: Your Turn Again – Data Validation

Sunday, October 01, 2006 5:42 PM by Shane Devenshire
I'm not sure what "hack" your talking about for referencing other sheets - unless one considers range names a "hack"?

You currently can use a list in another file but that is a little bit more of a hack and it only works if the other file is open.

At present one can create a formula to return unique items from a range to the DV filter but its not for the casual user, so a simple function to do that would be nice.

Onless I misunderstand the DV currently has a text only and and numbers only option - Decimals or Whole Number or Text which don't require formulas.

One of the posts suggested something which is like Access Mask property.  This would be nice with the customizing capabilities similar to Access.

Following from Access it might be useful to have a Zoom feature to allow easier manipulation of the Custom option.

# re: Your Turn Again – Data Validation

Sunday, October 01, 2006 11:35 PM by Shane Devenshire
Sorry about this being posted here, but I've been on other things.

Regarding Drawing Tools (to which comments are now closed).  

1. It would be nice if comments could have reference formulas and with this conditional formatting for the comments (and drawing objects, which already have the ability to reference cells).

2. Francis - Excel can already draw vertical lines on XY scatter and Line charts without using the drawing tools.  (Hope this is OK - send me an email and I will send you examples and steps. ShaneDevenshire@SBCGlobal.Net.

3.  A. - There is a way to select multiple object easily already: a. press F5, Special, Objects. b. More useful in 2003 might be adding the Select Multiple Objects tool to your toolbar.

4. Allow the addition of connection point as VISIO does.

# re: Your Turn Again – Data Validation

Monday, October 02, 2006 7:12 PM by jason

I second Biff's comment - formatting of the list is my number 1 bugaboo.  I like the idea of having the list presented in the same font, color, etc as the source!

New Comments to this post are disabled
 
Page view tracker