How to Put a Line in Excel: Borders, Shapes, Charts
Learn practical, step-by-step methods to add lines in Excel—borders, shapes, and chart lines—so your worksheets are clearer, better organized, and easier to review.
Goal: Put a line in Excel using borders, Shapes, or chart lines. Use borders for clean separation of cells, draw lines with the Shapes tool for precise placement, or add a line to a chart to emphasize a threshold. Choose the method that fits your data and print needs, then follow the steps in this guide.
Why a Line in Excel Matters
Lines help organize data, guide the reader, and simplify decision making. A horizontal line can mark a subtotal, a threshold, or a section break, while a vertical or diagonal accent line can highlight trends or annotations. According to XLS Library, mastering these techniques boosts readability and reduces errors when reviewing large datasets. In real-world workbooks, lines act like visual rails: they tell readers where one section ends and the next begins, and they can emphasize important values without altering the data itself. This section explains when to use borders, shapes, and chart lines, and it covers practical tips for color, thickness, and printing. We’ll also discuss accessibility considerations, such as high-contrast colors and consistent styling, so your spreadsheets remain usable by screen readers and colleagues alike. By the end, you’ll have a clear mental map of which method to reach for, and you’ll be able to apply it with confidence on your next report.
Methods to Put a Line in Excel
Excel provides three practical paths to add lines: 1) cell borders for grid-based separation; 2) drawing lines with the Shapes feature for arbitrary placement; 3) chart lines by adding a line series or a threshold line to an existing chart. Each method serves a different purpose. Borders are fast, print-friendly, and excellent for tables. Shapes let you place lines exactly where you want, including across cells and margins. Chart lines anchor a line to data, making it easy to highlight a target, limit, or trend. The rest of this guide walks you through each option with concrete steps, screenshots you can compare, and best practices for visibility and alignment.
Borders: Quick Borders to Delineate Cells
Borders are the simplest way to add a line, and they respect cell boundaries. To apply, select the cells, go to the Home tab, click Borders, and choose the line style you want (Bottom Border is common for a horizontal line). If you need a single, crisp line across a range, apply the Bottom Border to the bottom row or to a helper cell. For more control over thickness and color, select "More Borders" and customize the line color, style, and weight. After applying, press Ctrl+Z to undo if you apply too many borders. Pro trick: use the 'Draw Border Grid' option to maintain a consistent grid while adding emphasis lines. This method is ideal for tabular data and printed reports.
Draw a Line with Shapes
Go to Insert > Shapes > Line. Click and drag to draw a line across the worksheet. Hold Shift to keep the line perfectly horizontal or vertical. Use the Format tab to set the line color, weight (2-3 pt is usually visible), and dash style (solid, dash, or dot-dash). Once drawn, you can move, resize, or attach the line to specific cells using alignment guides. Tip: Group lines with nearby objects to keep the layout stable when you resize columns or filter data.
Add a Line to a Chart for Emphasis
To add a constant-threshold line to a chart, create a new column in your data range (e.g., "Target") and fill it with the threshold value across the same number of rows. Select the chart, choose Data > Select Data > Add, and pick the new column as a series. Change the chart type of the new series to Line (if it isn’t already) and format it with a contrasting color and dashed style. This creates a clear target or limit alongside your data line. You can also use a dynamic reference line with a formula, but the fixed-threshold approach is simpler for most reports.
Formatting for Visibility and Print
Line visibility depends on color, thickness, and contrast with the background. For on-screen reading, a dark blue or black line around 2-3 pt is typically effective. In print, test grayscale preview to ensure the line remains distinct. If you must use color, choose colors with high contrast and stay consistent across the document. Use dashed styles sparingly for emphasis, not decoration, and align lines to the grid to keep the sheet tidy.
Accessibility and Troubleshooting
Ensure lines are accessible: avoid light colors on white backgrounds and test color contrast in both on-screen and printed formats. If a line disappears after resizing, check that it isn’t being covered by another object, and consider placing a Shape line behind or in front of data as needed. For screen readers, add a nearby descriptive label in an adjacent cell to convey the line’s purpose. If a line won’t appear in print, verify page setup and print area, and choose a border or Shape option with stronger rendering.
Authoritative Sources
For deeper Excel guidance, consult official documentation and trusted guides: https://learn.microsoft.com/en-us/office/troubleshoot/excel, https://www.nist.gov, and https://www.osha.gov.
Quick Reference Checklist
- Decide whether borders, Shapes, or a chart line best fits your goal
- Apply the chosen method to the correct data range
- Format color and thickness for readability in screen and print
- Confirm accessibility and consistency across the worksheet
Authoritative Sources (reiterated)
Tools & Materials
- Microsoft Excel (Windows or macOS)(Any recent version supports borders, shapes, and charts)
- Mouse or trackpad(To draw lines with Shapes and adjust formatting)
- Keyboard shortcuts reference(Helpful for faster borders and formatting commands)
Steps
Estimated time: 20-40 minutes
- 1
Open the workbook and select the target area
Open your Excel workbook and navigate to the worksheet with the data. Select the cells where you want to place a line or identify the area the line will cross. This establishes the data range for subsequent steps and ensures alignment with your content.
Tip: Use Ctrl+Shift+Arrow keys to quickly select a block of contiguous cells. - 2
Apply a cell border to create a horizontal line
With the target cells selected, go to the Home tab and click Borders. Choose Bottom Border (or Top/Bottom as needed) to create a crisp horizontal line across the range. For a single line across a broader area, apply the border to the bottom edge of the last row.
Tip: For more control, select "More Borders" to customize color and thickness. - 3
Draw a line using Shapes for precise placement
Insert a line by selecting Insert > Shapes > Line, then click and drag across the area. Hold Shift to constrain the line to a perfect horizontal or vertical orientation. Format the line’s color and weight in the Shape Format tab.
Tip: Hold Shift to prevent accidental slants and misalignment. - 4
Add a line to a chart to highlight a threshold
Create a new data column with the threshold value, then select the chart and add this column as a new series. Change the series type to Line and format it with high-contrast color and a dash style.
Tip: Using a separate data series keeps the data chart uncluttered. - 5
Format the line for visibility
Choose a color with strong contrast, set weight to 2-3 pt, and select an appropriate dash style. Ensure the line remains visible when printed (check with Print Preview).
Tip: Test visibility in both color and grayscale. - 6
Test the line with data changes
Resize columns, apply filters, or sort data and verify the line stays aligned and visible. If the line shifts, consider anchoring it to cells or grouping it with nearby objects.
Tip: Avoid binding lines to moved data if the sheet will be frequently sorted. - 7
Save and share the workbook
Save the final version to preserve your line choices. If sharing, notify recipients about the line’s intent so they interpret it correctly.
Tip: Use Save As to create a versioned copy for review.
People Also Ask
How do I add a horizontal line between rows in Excel quickly?
The easiest method is to apply a Bottom Border to the bottom edge of the row where you want the line. You can also draw a Shape line across the area for more control. If you need it to align with data, use Borders for simplicity or a Shape for precise placement.
Use a bottom border for a quick line, or draw a Shape line if you need exact placement.
Can I insert a line into a chart to mark a threshold?
Yes. Create a new data column with the threshold value, add it as a new series to the chart, and format that series with a contrasting color and dash style. This provides a clear reference line without altering the original data.
Add a threshold as its own data series and format it for visibility.
What is the best method to keep lines visible when printing?
Borders tend to print cleanly in grayscale. If you use Shapes or chart lines, verify print settings and test a print preview to ensure contrast remains high and lines don’t disappear.
Check the print preview to ensure visibility in grayscale and color.
How do I remove a line I added by mistake?
Select the line or the affected cells, then press Delete. If you used Borders, reselect the cells and remove the border from the Border menu. For Shapes, select the line and press Delete again.
Click the line and press Delete, or remove the border from the cell’s border options.
Are borders better than shapes for temporary notes?
Borders are quick and stay with the cell grid, making them ideal for temporary notes and table formatting. Shapes offer more freedom for annotations but can complicate alignment during edits.
Borders are easier for quick work; shapes give you placement control when needed.
Watch Video
The Essentials
- Use borders for quick, print-friendly lines
- Draw Shapes for precise placement across cells
- Add a chart line to emphasize thresholds or targets
- Format with high contrast for readability in print and on screen
- Test accessibility and maintain consistent styling across sheets

