Today’s author, Dany Hoter, a Product Planner for the Excel team, shares a neat trick he learned recently for creating dynamic data validation ranges. The sample file used for this blog post can be found in the attachments at the bottom of this post.
The problem: Validating data entry based on hierarchical (parent child) data. The example used is regions and countries but it could be countries and cities, product categories and sub-categories, class and student name, etc.
You want to enter a region from a list of regions and in the next cell you want to select a country but only from the countries which belong to that region.
How do you define the list of countries to validate against? The trick is basing the country validation list on an expression which will point to a different range based on the region value.
Follow the instructions in the file itself (attached below) and see how it works.
Points to notice:
Code/Templates/Informaiton provided on this site are without any liabilities. Owner of this website in no event will be held reponsible to damages resulting by using the code/templates/applications/
Copyright © 2003 xlMacros.com - Learn Excel VBA
Microsoft Excel is a U.S. registered trademark of Microsoft Corporation
Excel Password Cracker Addin.
For $10 Today. Price back to $20 tommorow.
Never Worry About Lost Excel Passwords!!!
Remove Excel Password - the easy way has never been easier than this.