dynamic data validation lists

Post on 03-Jul-2015

149 Views

Category:

Technology

2 Downloads

Preview:

Click to see full reader

DESCRIPTION

Learn how to make Excel's validation list less maintenance and easier for end users.

TRANSCRIPT

Dynamic Content for Data Validation Lists

Building Solutions for Business

Data Validation Lists Overview

• Data validation provides a way to ensure the contents of the cell are restricted to specific choices in a list

• Data entry by list is faster and more accurate than typing a response in a cell

• It is an intuitive and familiar input method

• Will increase usability of data entry forms

The ChallengeBuilding a drop down list based on fixed or named ranges is not flexible, and can be complex for users to manage.

Data validation list can be difficult to manage when:

• The source location of the list changes

• New entries are added to the list

The Solution• This deck will step through building a data

validation list the traditional way

• It will then use a newer more flexible, self-managing method

• This method is very useful if you are distributing solutions to end users with less Excel experience

Building a Simple List• This example will walk through building a

dropdown validation list based on a range of cells

• Using cell ranges allows for the content of the list to be more easily managed

• Enter list values in a range of cells.

• Click on the data validation button in the data ribbon

• Select List from the Allow box

• Select the range of cells the list will display

• The list and data are now connected

• Changes to the source data will be shown in the list

Use Named Ranges• Using named ranged references for a list is a best

practice strategy

• From the previous example, let’s define the list of fruits with a name called “lstFruits”

• The data validation will now reference the name rather than a static range of cells

• Define a name for the range of cells using the name box to the left of the formula bar

• Use the name range in the list definition

What if the contents of list changes?

• This list will need to be maintained and sorted

• When adding items to a named range, you must take care that the item is picked up by the range

• This level of maintenance can be time consuming and beyond the skills of some users

• The answer is to create self maintaining lists

Dynamic List Ranges To the Rescue

• Let Excel automatically determine the number of rows in the list and just display those

• Items can be added or removed as required without impacting the ease of maintenance

Create the first item of list data starting at row 1

Note the old static definition of the list

Change the definition of the lstFruits name to the following

What the Formula Does

• This formula makes everything work

• CountA – will count all of the non-blank rows in the column

• Index – will determine the bottom of the list

=sheet3!$A$1:INDEX(sheet3!$A:$A,COUNTA(sheet3!$A:$A))

You’re Done• You can now add and change items in the list

without altering name definitions or tweaking named ranged

For more ideas and tips visit our blog at http://www.excelgenius.ca

Building Solutions for Business

top related