You are on page 1of 8

Data List

Idx Fruit Vegetable Farm Equip Farmer Value1 Region Value2 Name
1 Apple Turnip Tractor John 50 East 200 Jim
2 Banana Gourd Hoe Bill
3 Orange Turnip Rake Mike
4 Melon Tomato Ladder George
5

Implementation Notes
Validation Formula using RELATIVE reference 1 There are only 3 named ranges for the dro
Source: =UseList 2 All cells in the range for data entry (blue s
3 The sheet called Lists contains all of the d
4 The Range called Lists has been set as
5 All Validation List allowed entries occur in
6 Counter has the formula =COUNTA(Lists
7 UseList has the formula
=INDEX(Lists,1,COLUMN('Data Entry'!A
so it is a dynamic range that matches the
When viewd in cell C7 it would therefore t
=INDEX(Lists,1,COLUMN('Data Entry'!C
8 On sheet Lists, columns which are not req
9 Any number of entries can be added to the
10 Any future columns can be added to Lists

Developed by Contextures Inc. www.contextures.com


only 3 named ranges for the dropdown lists named Lists, Counter and UseList
n the range for data entry (blue shade) have the same validation formula, as shown at left - UseList
t called Lists contains all of the data for the validation lists
e called Lists has been set as Lists!$A2:$X$24. In reality it can be any size you want.
tion List allowed entries occur in the same column letter as the columns on the Data Entry sheet
as the formula =COUNTA(Lists!COLUMN(A:A))-1. This means it will change relative to the column being used, making the dropdowns of the appropriate length.

Lists,1,COLUMN('Data Entry'!A$1)):INDEX(Lists,counter,COLUMN('Data Entry'!A$1))


dynamic range that matches the column upon which you have allocated Data Validation.
wd in cell C7 it would therefore take the form
Lists,1,COLUMN('Data Entry'!C$1)):INDEX(Lists,counter,COLUMN('Data Entry'!C$1))
Lists, columns which are not required for validation lists have been hidden for convenience.
ber of entries can be added to the validation lists on sheet Lists and they will automatically be included.
e columns can be added to Lists without having to set up any further names. Just Apply DV to the relevant column on Data Entry by using Copy>Paste Special>Validation from

Developed by Contextures Inc. www.contextures.com


appropriate length.

>Paste Special>Validation from any other DV area.

Developed by Contextures Inc. www.contextures.com


Fruit Vegetable Farm Equip Region Name
Apple Carrot Tractor North Harry
Banana Gourd Hoe South Joe
Orange Turnip Rake East Jim
Melon Tomato Ladder West Mary
Potato Susan
Swede Bill
Roger
Jack
Fred
Debra
DD.Fruit DD.Veg DD.Equip noDD

Data List DropDown Lists

Idx Fruit Vegetable Farm Equip Farmer DD.Fruit DD.Veg


1 Apple Turnip Tractor John Apple Carrot
2 Banana Gourd Hoe Bill Banana Gourd
3 Orange Turnip Rake Mike Orange Turnip
4 Melon Tomato Ladder George Melon Tomato
5

Implementation Notes
1 There are 3 named ranges for the dropdown lis
Validation Formula using RELATIVE reference 2 The range "noDD" contains a single blank cell,
Source: =INDIRECT(C$2) 3 All cells in the range for data entry (blue shade)
Note that the column number is relative, but the row number is fixed 4 The (hideable) row 2 contains the name of the v
5 For this example, I do not use the "Error Alert"
6 The names in [J6:M6] are used when selecting

Possible Enhancements
1 Cell F2 could be left blank, so the entries benea
Currently, the cells could still show a dropdown
Add a VBA routine to remove the [InCellDropdo
DD.Equip noDD
Tractor
Hoe
Rake
Ladder

3 named ranges for the dropdown lists named [DD.Fruit], [DD.Veg], and [DD.Equip]
e "noDD" contains a single blank cell, so any value will be allowed when that range is used
n the range for data entry (blue shade) have the same validation formula, as shown at left
able) row 2 contains the name of the validation list range appropriate to the column below it
xample, I do not use the "Error Alert" or "Input Message" configuration of Data Validation, this can be used if required
es in [J6:M6] are used when selecting a dropdown list in range [C2:F2]

Enhancements
ould be left blank, so the entries beneath the "Farmer" column would have no valid dropdown values
the cells could still show a dropdown arrow when selected, but no list would appear.
A routine to remove the [InCellDropdown] feature of the validation, although this can be a finicky bit of code.
Contextures Products
Pivot Power Premium Add-in
UserForms for Data Entry ebook Kit
Contextures Excel Tools Add-in
Data Entry Search Popup
Data Entry Popup
30 Excel Functions in 30 Days eBook Kit

Contextures Sites & News


Contextures Excel Newsletter
Contextures Excel Tips Website
Contextures Excel Blog
Excel Pivot Tables Blog

Other Excel Products


Contextures Recommends
Time-saving tools for pivot table power users
Step by step instructions and videos
Make instant backups, sort sheets, and many more tools
Makes data entry easier when choosing from long list
Select single or multiple items from a listbox, to enter in a single cell
Sample workbook and easy to follow user guide for key Excel functions

Weekly Excel tips, tutorials, videos, and news


Hundreds of tutorials, tips and sample files
Read the Excel tutorials and share your comments
Pivot table tutorials and tips, with comments and questions

Other Excel tools and training, recommended by Debra

You might also like