Creating a user-friendly Data Validation in Excel Displaying help out of the way

Content

Introduction

I regularly design worksheets into which a user has to enter information. Of course when I do so, I make extensive use of:

This post is mainly about leveraging the Data Validation Input Message. See the animated gif below:

Excel Data Validation trick

Download

I prepared a sample workbook for you to download.

Cell styles

When you design a data entry form in Excel it is a good idea to use cell styles to clarify the purpose of the cells on the entry form and to direct the user to where his attention is needed.

A simple data entry form might look like this:

A simple data entry sheet in Excel

Looks nice doesn't it.

Note that I did not apply any manual formatting, I used the built-in cell styles:

Cell styled used

Now as happy I might be that Microsoft decided to provide some pre-defined styles, they didn't quite finish the job properly. Look at the formatting options of this "Input style":

Input style properties

See what's wrong? No? They didn't set protection! So if I decide to password-protect my worksheet, all my input cells are locked. This is why I always add a user-defined style called "InputUnprotected". And perhaps a couple more if I need various different number formats to match what needs to be entered. One for each input type:

OK, enough about styles. Want to learn more? Read on about styles here.

Proper labelling

You might think this goes without saying, but I've seen plenty data entry sheets where it is left to the fantasy of the user what information is expected to go into which cells. My screenshot at the top lacks inspiration a bit, only the first cell is labelled more or less clear. Though you might argue that just asking for a name is ambiguous at best :-)

Data Validation

Now to the fun part of this article. Data Validation. Lets click the cell next to Name and open the DV dialog. Forget about its first tab for now, you already know what that one's for. In comes the "Input Message" tab!

Input Message tab of Data Validation

That looks pretty useful, does it not? You can set a Title and an Input message, with which you can show elaborate help! But there is a problem. It is elaborate and the message doesn't go out of the way:

Data Validation Input Message displaying

Also, the popup covers the remaining input cells and is very distracting, especially if the form contains many cells to fill. And it cannot be dismissed. You can drag it out of the way, but that causes all subsequent popup messages to appear in the same place. Luckily Excel does not save that position, so next time you open the file the popup appears in its nice in-your-face position again.

A better way, no popup but help when needed

I resolved that issue in my sample file in an interesting way, which I am sharing with you below. You did notice the tiny (i) "icons" next to the data entry cells, didn't you? Here is how I created them.

Style formatting dialog

Cell Styles drop-down

Notice the nice i icon? The boxes in the Styles drop-down give an impression of what a cell looks like after applying the style. This includes the Font. If I would have used a regular name for this i style, the drop-down would have looked like this (I used 'SomeNameForTheStyle'):

Cell Styles drop-down 2

Given that the Webdings i character looks like the information icon I thought using i for its name might be good!

Finally I want to add a nice touch to this new icon: I want to see this when my mouse passes over it:

Click Here For Help

This is done like so:

You can avoid having to apply the cell style twice by reversing the order: first define the hyperlink, then set up the data validation and cell style.


Comments

Loading comments...