How to Add a Dashed Line in Excel: Step-by-Step Guide
In this article
To add a dashed line in Excel, you apply a dash style to a shape border, a cell border, or a chart line. The quickest method is to select the object, open its Format pane, and choose a dash type under the Line settings. The exact clicks differ slightly between shapes, cells, and charts, so the steps below cover each case. No special add-ins are needed; everything is built into Excel for Windows, Mac, and the web version, though some border options are limited in Excel for the web.
What You'll Need
- Microsoft Excel (desktop version recommended for full border and chart formatting; Excel for the web supports basic cell borders but not all dash styles).
- A worksheet with the cells, shape, or chart you want to format.
- Optional: a printer or PDF export if you want to check how the dashed line looks on paper.
Step-by-Step
Menu labels can differ slightly by Excel version, device, and region. The paths below are for Excel for Microsoft 365 on Windows; Mac and older versions use similar names.
Method 1: Dashed cell borders
- Select the cell or range where you want the dashed border. To select non-adjacent cells, hold Ctrl (Windows) or Command (Mac) while clicking.
- Go to the Home tab, then find the Font group and click the arrow next to the Borders button.
- Choose More Borders at the bottom of the menu. The Format Cells dialog opens on the Border tab.
- Under Line, open the Style list and pick a dashed style. The preview shows a sample; dashed styles include short dashes and longer dashes.
- Under Presets, click Outline to apply the border to the outside of the selection, or click Inside to apply it between cells. You can also click the individual edge buttons in the preview.
- Click OK. The dashed border appears around the selected cells.
If you only need a quick border, the Borders menu also has a Line Style submenu where you can pick a dashed style before drawing the border with the mouse. This is faster for a single cell but less precise for a range.
Method 2: Dashed line on a shape or text box
- Insert the shape: go to Insert > Shapes and pick a line or shape, then draw it on the sheet.
- With the shape selected, go to Shape Format (called Drawing Format in some versions) and click Shape Outline.
- Point to Dashes and choose a dash style from the gallery. The line updates immediately.
- For more control, click Shape Outline > Weight to set the line thickness, or click More Lines at the bottom of the Shape Outline menu to open the Format Shape pane.
- In the Format Shape pane, under Line, you can set the Dash type, Cap type, and Join type. Use the Dash type dropdown to pick a pattern such as Dash, Round Dot, or Dash Dot.
To make a dashed connector between two shapes, insert a line connector from Insert > Shapes, then follow the same Shape Outline > Dashes steps.
Method 3: Dashed line in a chart
- Click the chart to select it, then click the specific line or series you want to change. For a line chart, click directly on the line; for a trendline, click the trendline.
- Right-click the line and choose Format Data Series (or Format Trendline). The Format pane opens on the right.
- In the Format pane, click the paint bucket icon (Fill & Line) if it is not already selected.
- Expand Line and open the Dash type dropdown. Choose a dashed pattern.
- Close the pane. The chart line now uses the dash pattern.
For gridlines, right-click a gridline and choose Format Gridlines, then set the Dash type in the Line section. For axis lines, right-click the axis and choose Format Axis, then adjust the line style under the Line section.
Method 4: Dashed line as a drawing guide
Excel does not have a dedicated ruler guide like some design tools. If you want a non-printing dashed guide, insert a line shape, set its dash style as above, and then set the shape to not print: right-click the shape, choose Format Shape, go to Size & Properties, and clear the Print object checkbox. This keeps the guide on screen but out of printouts and PDFs.
Common Mistakes
- Applying a dash style but seeing no change. The dash style only affects the border or line you apply it to. If you pick a dash style in the Borders menu but then click a preset that uses a solid line, the solid line wins. Always set the style first, then apply the border.
- Confusing cell borders with shape outlines. Cell borders are set through the Home tab or Format Cells; shape outlines are set through Shape Format. Using the wrong menu leaves the other object unchanged.
- Expecting dashed borders in Excel for the web. The web version supports basic borders, but the full dash style gallery may not be available. Use the desktop app for precise dash patterns.
- Forgetting that dash patterns scale with line weight. A thick line with a short dash pattern can look almost solid. If the dashes are too tight, reduce the line weight or choose a longer dash pattern.
- Printing a dashed guide. Shapes print by default. If you used a dashed line as a layout guide, turn off Print object for that shape, or move it to a hidden row or column.
Tips
- Use the Format Painter to copy a dashed border or shape outline to other cells or shapes. Select the formatted object, click Format Painter on the Home tab, then click the target.
- For a dashed border around an entire table, apply the border to the range first, then use Format Cells > Border to fine-tune which edges get the dash.
- Keyboard shortcut: Ctrl+1 (Windows) or Command+1 (Mac) opens Format Cells for the selected cells, where you can set border styles quickly.
- In charts, dashed lines are useful for forecast or target series. Apply the dash to the data series, not the chart area, to keep the rest of the chart solid.
- If you need a dashed line that follows a cell border exactly, use a cell border rather than a shape. Shapes float above cells and can shift when rows or columns resize.
Troubleshooting
The Dash type dropdown is greyed out. This usually means the selected object does not support line formatting, such as a cell range selected in the worksheet rather than a shape or chart element. Select the actual line, border, or chart series first.
The dashed border disappears after reopening the file. Check whether the file was saved in a format that does not preserve all formatting, such as CSV. Save as .xlsx to keep borders and shapes.
Dashes look uneven or too dense. Adjust the line weight or choose a different dash pattern. Very thin lines can render dashes poorly on screen; zoom in to check the actual appearance.
Cannot find Shape Outline. Make sure a shape is selected. The Shape Format tab only appears when a drawing object is active. If you are editing a chart, use the Format pane instead.
Dashed line prints as solid. Some printers render very fine dash patterns as solid at small sizes. Increase the line weight slightly or choose a longer dash pattern before printing.
Frequently Asked Questions
Can I make a dashed line in Excel without a mouse?
Yes, for cell borders. Select the cells, press Ctrl+1 (Windows) or Command+1 (Mac) to open Format Cells, then use the Border tab. The Style list includes dashed options. For shapes and charts, keyboard-only navigation is possible but tedious; a mouse or trackpad is more practical.
Why does my dashed border only appear on some sides?
The Border tab lets you apply styles to individual edges. If you clicked only the top edge button in the preview, only the top border changes. Click the Outline preset to apply the dash to all four sides at once.
Can I use a dashed line as a cell fill pattern?
No. Dash styles apply to borders and line objects, not to cell fills. For a patterned fill, use the Fill tab in Format Cells and choose a pattern style, which is different from a dashed border.
Does Excel for the web support dashed borders?
Excel for the web supports basic cell borders, but the full range of dash styles may not be available. For complete dash options, use the Excel desktop app.
How do I remove a dashed border?
Select the cells, open the Borders menu on the Home tab, and choose No Border. For shapes, select the shape and set Shape Outline to No Outline.
Can I save a dashed line style for reuse?
Excel does not have a named line style library for borders. The closest option is to format a cell or shape the way you want, then use the Format Painter to copy that formatting to other objects. For charts, you can save a chart as a template, but that is a broader workflow.