Excel: Managing Data - Macros, Lists, and Validation
Creating Cell Drop Down Menus and Adding a Condition
From time to time you may need to have a list of options for your clients to choose from; this is
especially true when creating contracts, invoices, and forms in Excel. For example, you can have a cell
activate as a drop down with the options of 1 month, 3 months, 6 months, or 12 months when creating
a lease contract. Then you can have the “amount due each
month” cell auto-populate with the correct rent amount
without having to type the information in yourself.
Click into cell A41 in the table spreadsheet.
Type “1 month” in A41, “3 months” in A42, “6
months” in A43, and “12 months” in A44.
Click in cell B41. (We are going to place the list
here.)
Go the Data Tab and click Data Validation.
Click Data Validation again.
The Data Validation meu will appear.
In the Allow -> List.
Then either type the absolute formula =$A$41:$A$44
or select the cells after clicking in cell A41- A44.
Make sure In-cell dropdown is selected. This will allow us to apply this drop down anywhere on
the spreadsheet.
Click Ok.
Now when you click into cell B44, you will see the droplist. You can choose any of the options.
Let’s apply a conditional formula (review the breadcrumb conditional formula from a previous
workshop).
In cell C43 type: =IF(B41=”1 month”,”$400 per month”,IF(B41=”3 months”,”$600 per
month”,IF(B41=”6 months”,”$900 per month”,IF(B41=”12 months”,”1200 per month”,”Write
In”))))
Now cell C43 will update as the information changes in cell C43! What we are saying with this
formula is what lease by month a person signs, the appropriate rent will apply in the cell C43.
Multi-Layered Lists
You can create multi-layered lists with a drop down to auto-input information into a table or data set.
Go to the Cell List spreadsheet.
Let’s create list by region and another list of states by region.
Click the letter A to highlight all of column A.
Go to the Data tab -> Data Validation -> Data Validation.
Change Allow to List and Source: Highlight the cells that has
the region information (E1 – J1)
Click Ok.
Now click into Cell A2 and you can see the drop down list.
**This list will apply to the entire column since we
highlighted the column when creating the list**
To add the corresponding states to the region in column B, highlight all columns and rows that
contain the data you need – include blank cells in columns if some columns don’t have as long a
list. For this example, highlight cells E1 – J9. This should highlight all cells that has data.
Go to the Formulas tab -> Create from Selection