On this put up, we are going to present you how to Insert a diagonal line to a cell in Microsoft Excel and Google Sheets. Diagonal strains are sometimes used to cut up a cell to differentiate the headings for the primary column and the highest row whereas working with tables in spreadsheet software program. They’re additionally used to show a couple of worth in a cell or create multi-valued cells for audit reviews. Whereas Microsoft Excel affords a built-in method to insert a diagonal line to a cell, there’s no direct method provided by Google Sheets. Although, there are workarounds.

How to put a Diagonal Line through a Cell in Excel or Google Sheets

There might be many use instances of getting a diagonal line to cut up knowledge in a cell; however, studying alternative ways of doing this will show to be helpful in the event you’re an everyday person of Microsoft Excel or Google Sheets.

Microsoft Excel makes it simpler than ever, because it supplies a characteristic utilizing which you’ll be able to shortly add a diagonal line to a cell. Sadly, no such characteristic is offered in Google Sheets as of now. However you may nonetheless do that utilizing some strategies we’re going to clarify in this text.

Break up a cell diagonally in Microsoft Excel

As acknowledged above, there’s a built-in choice to diagonally cut up a cell in Excel. Nevertheless, you can even use ‘Shapes’ to insert a diagonal line right into a cell. So there are 2 methods of doing this in Excel:

  1. Utilizing the Border characteristic
  2. Utilizing Shapes

Allow us to see these in element.

A] Utilizing the Border characteristic

Choose the cell that you really want to cut up diagonally. Then right-click on it and choose the Format Cells… choice from the context menu.

Within the Format Cells dialogue window, click on on the Border tab. Underneath the Border part, you’ll discover two presets to add diagonal strains to the cell (high to backside and backside to high), as proven in the above screenshot. Choose a preset to preview it. Then click on on the OK button.

The diagonal line will probably be added to the cell. Now enter the two headers giving some area in between, and wrap textual content throughout the cell. After this, use the area bar or backspace to alter the positions of each headers in accordance with the diagonal line. You might also press Alt+Enter, protecting the mouse cursor earlier than the second header to stack it under the primary header.

To take away the diagonal line, choose None underneath Presets in the Format Cells window.

B] Utilizing Shapes

Click on on the Insert tab on the high of the spreadsheet. Then click on on Illustrations > Shapes, and choose the Line instrument. Your mouse cursor will change right into a plus (+) icon. Take it to the cell which wants to be cut up diagonally. Make a left mouse click on, maintain it, drag it to draw a line, after which launch the clicking when the road is drawn. Change the colour of the road utilizing the Form Format choices.

Now add the headers as described above.

That is the way you insert a diagonal line to a cell in Microsoft Excel. Now let’s see how to do that in Google Sheets.

How to Insert a diagonal line to a cell in Google Sheets

Break up a cell diagonally in Google Sheets 

In Google Sheets, you need to use the next options to insert a diagonal line to a cell:

  1. Utilizing the Textual content Rotation characteristic
  2. Utilizing the Drawing characteristic
  3. Utilizing the SPARKLINE perform

Allow us to see these in element.

A] Utilizing the Textual content Rotation characteristic

Textual content Rotation is a characteristic of Google Sheets that enables rotating the content material of a cell. It not simply tilts the textual content, but additionally affords a customized angle choice to outline the diploma of rotation. You should use this characteristic to add a diagonal line to a cell. 

Choose the cell the place you’d like to insert a diagonal line. Then enter the primary header. Press the Alt key, maintain it, and press Enter. The cursor will come to the start of the following line throughout the similar cell. Draw a line utilizing dashes (——-). Once more press Alt+Enter to convey the cursor to the following line after which sort the second header. 

Now Click on on the Format menu on high and choose Rotation > Tilt up/ Tilt down.

This may rotate the road diagonally, together with the textual content. By default, the content material of the cell will probably be rotated at 45 levels. You possibly can change this and apply a special angle of rotation to the cell utilizing the Customized angle choice. 

Please observe that if the cell has borders, they will even be rotated together with the cell content material and make the entire association look displaced. In that case, it’s possible you’ll use the following methodology to diagonally cut up a cell in Google Sheets.

B] Utilizing the Drawing characteristic

The Drawing instrument permits you to create a drawing or an illustration on a clean canvas utilizing shapes, pictures, and so on., and insert it into your spreadsheet.

Choose the cell which wants to be cut up diagonally. Enter the two headers utilizing Alt+Enter as described above, and use the area bar to alter their place throughout the cell.

Now click on on the Insert menu on high and choose the Drawing choice.

You’ll be offered with a clean canvas. Choose the Line instrument from the toolbar on high of the canvas. Utilizing your mouse, draw a diagonal line on the canvas. Then click on on the Save and Shut button.

The road will seem on high of the chosen cell. Click on on the road to choose and resize it. Resize the road to match the cell. This fashion, you may insert greater than 1 diagonal line right into a cell in Google Sheets.

Learn: How to insert WordArt in Google Sheets utilizing Google Drawings.

C] Utilizing the SPARKLINE perform

The Sparkline perform is used to create miniature charts that may match inside single cells. It represents a development primarily based on the numerical knowledge of a specific vary of cells. This development can take up 3 completely different types: line, column, and bar. We are able to use the ‘line’ type to create a diagonal line inside a cell in Google Sheets.

SPARKLINE perform has the next syntax:

= SPARKLINE(knowledge, [options])

The place knowledge refers to the cell vary containing the numeric knowledge, and choices are further settings used to customise the sparkline chart.

Earlier than we proceed, please observe that the SPARKLINE perform takes up your complete cell, so you may’t enter any worth in the cell. So this methodology will principally insert a diagonal line in a clean cell in Google Spreadsheets.

Click on on the specified cell and sort the next perform to draw a diagonal line from high to backside:

=SPARKLINE({1,0})

Press the Enter key. The cell will cut up diagonally. Within the above perform, we’ve handed 2 datapoints as 1 and 0. So the perform will create a diagonal line because of this.

To attract a diagonal line from backside to high, sort the next perform in the cell:

=SPARKLINE({0,1})

You possibly can change the colour of the road utilizing the shade argument as follows:

=SPARKLINE({0,1}, {"color","blue"})

You may also alter the peak and width of the cell to alter the scale of the road.

Hope you discover this put up helpful. Do tell us in the feedback part under you probably have any points.

Learn Subsequent: How to add a Tooltip in Excel and Google Sheets.



Source link

Share.
Leave A Reply

Exit mobile version