How to draw a line in Excel

In MS Excel, you can not only create tables and work with data from these tables, but also create charts and graphs, as well as draw various shapes, lines, arrows. You will be surprised how easy it is to draw a line of the desired length and parameters. Lines can be used to connect different elements in a flowchart or add pointers to a diagram, connect shapes, and so on.
How to draw a line with connection points in Excel
How to draw a line without connection points
How to draw multiple lines in Excel
How to draw a dotted line in Excel
Line Options in Excel
How to draw a line on an Excel chart

How to draw a line with connection points in Excel

Connection points are used to connect lines with different shapes or other lines. In order to draw a line in Excel, you can not use third-party drawing tools. MS Excel includes a tool for adding all kinds of shapes and lines to tables and charts. To draw a line, do the following:

  1. From the Excel main menu, go to the “Insert” tab.
  2. Click the “Shapes” button.
  3. In the “Lines” block, select the line image. Lines block
  4. Click the mouse in the place where the line will start and, without releasing the mouse button, drag the line to the desired length and in the desired direction. Drag the line

If you click on a connection point, you can change the length and direction of the line. The line can also be moved. To do this, move the cursor to any place on the line until multidirectional arrows appear and drag the line to the desired place with the mouse.

How to draw a line without connection points

This method is used to select one or more cells on any side or combine several cells into a single block. For example, let’s draw a horizontal line along several cells.

  1. Click on the cell that will contain the beginning of the line, press the Shift button and, without releasing it, left-click on the cell that will contain the end of the line. Draw  line
  2. Right-click on the selected cells and select “Format Cells” from the menu that opens. Format Cells
  3. In the window that opens, go to the “Border” tab and select the type of line and its location. In this case, you can choose the location of the border at the bottom or at the top. Border
  4. Click the OK button and deselect the cells by clicking anywhere on the sheet. OK button

As a result of these actions, you will get an even horizontal line along the entire length of the selected cells.

The disadvantage of this method is that it can only draw horizontal or vertical lines, or draw diagonal lines. This allows, for example, shading a selected rectangle from cells. Diagonal lines
If this method is not suitable for drawing a line, you should use the above method of drawing lines with connection points.

How to draw multiple lines in Excel

If you need to draw not one line, but several lines in a row, use the method of drawing lines with a connection point and use one additional option.

  1. Click the “Insert” tab on the Excel main menu.
  2. Click on the “Shapes” button.
  3. In the menu that opens, in the “Lines” block, right-click on the selected line type and select the “Lock drawing mode” section.Lock drawing mode
  4. Draw as many lines as you need.Draw as many lines

There are several ways to exit the drawing mode, for example, on the “Drawing Tools” tab, release the line drawing button. Drawing Tools
You can also exit the drawing mode by simply pressing the Esc key.

How to draw a dotted line in Excel

There are several ways to draw dotted lines in Excel. Let’s consider the simplest of them.

  1. From the Excel main menu, go to the “Insert” tab.
  2. Click on the “Shapes” button and in the “Lines” block, select a regular line.
  3. Place the cursor at the beginning of the line and, holding down the left mouse button, draw a line of the desired length and direction.
  4. Right-click on the drawn line and select “Shape Format” from the menu that opens. Shape Format
  5. Go to the “Line Style” section and select the type of stroke of the desired shape and size. Line Style
  6. Click the “Close” button.

There is another way to change the solid line to dashed. To do this, click on the line, go to the “Format” tab and in the “Shape Outline” block, select the dotted line of the desired size. Shape Outline
In order to change several lines to a dashed line at once in this way, left-click on one of them, press the Ctrl key and, without releasing it, click one by one on all the lines to be changed. Once all lines are selected, go to the Format tab and select the line outline as described above.

Line Options in Excel

In Microsoft Excel, you can not only draw lines, but also change their parameters: color, style, add a shadow, gradient, and so on. To change the line parameters, left-click anywhere on the line. As a result of this, the “Format” tab will open, where you can make the necessary changes. Line Options
You can make the necessary changes to the appearance of the line in another way. To do this, right-click at the beginning or end of the line. In the menu that opens, select “Format Shape “.

Make changesThe Edit Shape window opens with several sections. Some of them are not available for lines, such as “Fill”, “Picture”, “Text Box”.

FillLet’s consider sections available for lines.

  1. Line Color. Here you can change the color of the line, add a gradient and a degree of transparency. Line Color
  2. Line Style. At this point, you can change the line width, change the solid line to a dashed line, and select the size and shape of the stroke. Line Style
  3. Shadow. You can add a shadow to the drawn line. Shadow parameters can be selected from already created blanks or you can set the shadow settings yourself. Shadow
  4. 3-D Format. You can make the line three-dimensional and set the desired parameters for this.3-D Format
  5. 3-D Rotation. You can adjust the angle at which the volume line will be placed.3-D Rotation

The options for changing line parameters may vary depending on the version of Excel. It is important to remember that after you draw a line, you can always change its settings.

How to draw a line on an Excel chart

Consider the simplest case when we need to draw a certain control line on an Excel chart. This line will illustrate the deviations of the results in one direction or another from the normal level. Excel chart
For this purpose, you can use the usual way of drawing lines with a connection point.

  1. On the “Insert” tab, click the “Shapes” button and select a regular line.
  2. Position the cursor at the desired location on the graph and draw a baseline.Draw a baseline
  3. Right-click at the beginning or end of the line and select the desired color, width, and other options.

There are other methods for displaying lines on an Excel chart. These can be lines that are built using built-in Excel functions. For example, trend lines and moving average lines are built in this way.

As you can see, drawing an arbitrary line in Excel is quite simple. Even a novice user can easily cope with this. Also, don’t forget to back up important Excel files and encrypt confidential documents. If you forget the password for such a file, programs specially designed for this purpose will help you Excel password recovery.