
Tips.Net > ExcelTips Home > Formatting > Borders and Shading > Automatic Lines for Dividing Lists
Summary: You can use conditional formatting to add automatic dividing lines between groups of data in your worksheets. This tip shows how easy it is to add the lines. (This tip works with Microsoft Excel 97, Excel 2000, Excel 2002, Excel 2003, and Excel 2007.)
Let's say you have a list of company transactions. Each transaction includes a department number, a title, and other information (amount, date, time, sales rep, etc.). As you get more and more of these items in your list, you may want a way to automatically add "dividing lines" based on the department number. For instance, when the department number changes, you may want to include a line between the two departments.
To add this type of formatting to your list, start by sorting your data table by department. Then follow these steps:
The steps for adding the proper conditional formatting are a bit different in Excel 2007. (The formula you use is the same; it is just the steps that are different.) Follow these, after you've sorted your list by department:
That's it; you should now see a line that appears across the entire width of your data every time the department changes.
Tip #3189 applies to Microsoft Excel versions: 97 2000 2002 2003 2007
PivotTables Got You Perplexed? ExcelTips: PivotTables for the Faint of Heart shows how you can start using Excel's PivotTable tool right away to spin your data into gold! You discover how easy it really is to crunch the numbers you need to crunch. Uncover the power of the PivotTable Wizard, how to edit PivotTables, how to format them, how to customize them, and much more.
Check out ExcelTips: PivotTables for the Faint of Heart today!
Thousands of ExcelTips, available for immediate download. Have all the Microsoft Excel info you need, right at your fingertips. (more information...)
Ask an Excel Question
Make a Comment
ExcelTips FAQ
ExcelTips Premium
Beauty Tips
Bugs and Pests Tips
Car Tips
Cleaning Tips
College Tips
Cooking Tips
Excel2007 Tips
ExcelTips
Family Tips
Gardening Tips
Health Tips
Home Tips
Money Tips
Organizing Tips
Pet Tips
Word2007 Tips
WordTips
Advertise on the
ExcelTips Site