Please Note: This article is written for users of the following Microsoft Excel versions: 97, 2000, 2002, and 2003. If you are using a later version (Excel 2007 or later), this tip may not work for you. For a version of this tip written specifically for later versions of Excel, click here: Automatic Lines for Dividing Lists.
Written by Allen Wyatt (last updated April 30, 2022)
This tip applies to Excel 97, 2000, 2002, and 2003
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:
Figure 1. The Conditional Formatting dialog box.
Figure 2. The Borders tab of the Format Cells dialog box.
That's it; you should now see a line that appears across the entire width of your data every time the department changes.
ExcelTips is your source for cost-effective Microsoft Excel training. This tip (3189) applies to Microsoft Excel 97, 2000, 2002, and 2003. You can find a version of this tip for the ribbon interface of Excel (Excel 2007 and later) here: Automatic Lines for Dividing Lists.
Create Custom Apps with VBA! Discover how to extend the capabilities of Office 2013 (Word, Excel, PowerPoint, Outlook, and Access) with VBA programming, using it for writing macros, automating Office applications, and creating custom applications. Check out Mastering VBA for Office 2013 today!
Borders on all sides of a cell are easy to do in Excel. You can also create diagonal borders that run right through the ...
Discover MoreExcel provides a variety of tools you can use to make your data look more presentable on the screen and on a printout. ...
Discover MoreExcel makes it easy to add all sorts of lines around a cell or range of cells. How easy? This tip demonstrates how to add ...
Discover MoreFREE SERVICE: Get tips like this every week in ExcelTips, a free productivity newsletter. Enter your address and click "Subscribe."
There are currently no comments for this tip. (Be the first to leave your comment—just use the simple form above!)
Got a version of Excel that uses the menu interface (Excel 97, Excel 2000, Excel 2002, or Excel 2003)? This site is for you! If you use a later version of Excel, visit our ExcelTips site focusing on the ribbon interface.
FREE SERVICE: Get tips like this every week in ExcelTips, a free productivity newsletter. Enter your address and click "Subscribe."
Copyright © 2024 Sharon Parq Associates, Inc.
Comments