Wednesday, January 6, 2010

Nerdy Excel stuff

I may be the only person that ever references this page, but I'm putting it on here anyway. If you ever need to make drop-down lists that change the color of a row depending on which option you select, this is how to do it in MicroSoft Excel 2007:

Let's say you're working to display a table of issues that have priorities from Low to High. Create a workbook with 2 worksheets - one for data, one for the list. The List Sheet is easy. All you need is a vertical list that looks like this:

Low
Medium
High
Critical


Highlight all four items, right click and select 'Name a Range'. Copy the 'Refers To' line and go to the Data Sheet.

On the Data Sheet, create a table with two columns: Issue Number and Priority. Click on the first cell for Priority. Then go to the Data Tab and click on Data Validation in the Data Tools section. In the window that pops up, select List and paste the 'Refers To' from your other sheet into the Source text.

Now you should have a drop-down for that row. To add color to the row, highlight all cells in the first row. Go to the Home Tab and click on Conditional Formatting in the Styles tab. Click Create New Rule and select "Use a formula to determine which cells to format". Paste this in:

=INDIRECT("B"&ROW())="Low"


This assumes that Column B has the list. Use this site as a reference.

Wow your boss with this one.

No comments:

Post a Comment