5 easy ways to make data validation work for you

One of the easiest ways to add interactivity to your spreadsheets and dashboard is to use the data validation feature in excel. Data validation allows you specify a list of options that you want a cell to display as a drop-down.

You may want to download the sample sheet here before we begin.

To being creating a dropdown for a particular cell, select the cell and click Data -> Validation. In the validation criteria dropdown box, choose “List”. Remember – you can specify both static values (1,2,3,4) or named ranges (=listoffruits, if you have one defined already)

Static values: Type in the values seperated by commas (Ex. Roberto, Wilhelm, Akido) in the “Source” box. Click Ok and check the list that appears in the cell dropdown.
Named ranges: Excel provides you with a feature to set a name for a continous range of cells. These are what are referred to as “Named Ranges”. Enter values Pizza, Hamburger, Noodles in three seperate but continous cells. Now select all the three cells. In the Name Box (usually situated right above the left intersection of row and column headers) type “food”. Now we can go back to Data -> Validation and select “List” in the drop-down. In the “Source” field enter =food and click ok. You will see a dropdown with the values of the cells you named as “food”.

What’s more you can make these named ranges dynamic such that depending on some criteria a name may refer to a certain selelction of cells at some points and a different selection of cells at other. Well this can be done by *managing* the list – a list that does not explicitly refer to a fixed grouping of cells but rather to a group of cells returned by a formula. The excel “OFFSET” formula is my personal favourite. Usually offset() allows return the value of a cell which is certain number of rows and columns away from a cell. However, further arguments can be specified that can return a range of cells that is not only a certain number of rows and columns away from a cell but also a cells high and b cells across. Example =offset($a$1,1,2, 4,5) will return a range of cells whose first cells is C2 and the last cell is H6. If we reduce the value 4 OR the value 5 in above example (which specify the number of rows and columns of the range to be returned) to 1, we will get a linear (horizontal OR vertical) array of cells. If we could put this formula as the range for a named range point to, we’ve just made for ourselves a Dynamic Named Range.

Click on Insert -> Name -> Define. Enter a descriptive name in the “Names in workbook” field and in the “Refers to” box, ente the above formula as =offset($a$1, 1, 2, 1, 4). Ensure that The cells C2 to H2 have some names in them. Click ok. You will now see a dropdown against that particular cell. You can further modify the value of the value 4 and replace it with some formula (=count(NumberOfPeople) or something of this nature) so that the number of values in the dropdown of you cell now becomes dependent upon some user input and is can therefore change on the fly !!!


What Do You Think ?


Comments and Trackbacks

  1. da TaB is On » Create Chart using Named Range in Excel wrote:

    […] cells present on the worksheet or another function itself such as COUNT. You can read more about dynamic range in excel in this […]

  2. How to Create a Dashboard in Excel | da TaB is On wrote:

    […] is an amazing way of presenting and organizing data in an excel dashboard. You can read about data validation and named range […]


Keep up with the latest stories - Delivered right to your inbox


treeemap software for excel