In this article, we have discussed 5 different ways in Excel to rotate text. We have also shown you how to rotate text at any custom angle. Then, we explored different methods to change text orientation to horizontal. Lastly, we have explored text alignment options in Excel.
One can take measures in Excel to rotate text to enhance data presentation and enable reading in a small space. It is necessary to rotate text to fit text in narrow columns. Certain text orientations improve the readability of the user.
Download Practice Workbook
You can download this practice workbook while going through the article.
How to Rotate Text in Excel
We will use the following dataset to show various methods in Excel to rotate text.
1. Use Ribbon Alignment Option
- Select range B4:F4 >> go to the Home tab >> select Orientation from the Alignment group.
- Select Angle Counterclockwise to rotate your text 45 degrees counterclockwise.
You can also rotate your text in other provided directions from the list.
- You will see the text rotation in range B4:F4.
Repeat the same steps to change the text into a horizontal orientation.
2. Use Format Cells Dialog Box
- Select range B4:F4 >> go to the Home tab >> select Orientation from the Alignment group >> select Format Cell Alignment option.
- Select the Alignment tab of the Format Cells dialog box.
- Put 45 in the Degrees bar and press OK.
- You will see the text rotation in range B4:F4.
3. Keyboard Shortcut to Rotate Text
- Select range B4:F4.
- Press Alt + H and you will see various shortcuts for the options of the Home tab.
- Press F + Q.
- You will see several shortcuts for the options for changing text orientation in Excel. Press O to rotate your text 45 degrees counterclockwise.
- You will see the rotated text in range B4:F4.
Repeat the same steps to change the text into a horizontal orientation.
4. VBA Code to Rotate Text in Excel
We will use the same dataset.
- Go to the Developer tab >> Visual Basic.
- Select Insert >> Module.
- Paste this VBA code in the VBA Macro Editor.
- Press the Run button or F5 key to run the code.
Sub Rotate_Text()
   'variable declaration
   Dim WS As Worksheet
   Dim myRng As Range
   'set variable
   Set WS = ActiveSheet
   Set myRng = WS.Range("B4:F4")
   'rotate text
   With myRng
       .Orientation = 45
   End With
End Sub
- You will see the text rotation in range B4:F4.
With myRng
       .Orientation = 45
End With
This portion of the code sets the orientation of myRng range to 45 degrees. It displays the texts in that range of cells in 45 degrees counterclockwise direction.
5. Rotate Axis Label in Excel Charts
- Select range B4:F5 >> go to the Insert tab >> select Line Chart from the Charts group >> choose any chart.
- You will see the chart in your worksheet. Give it an appropriate title.
- Right-click on the x-axis label >> select Format Axis.
- Format Axis menu will open on the right side of the worksheet.
- Select Size & Properties.
- Type -45 in the Custom angle bar to rotate the axis label 45 degrees counterclockwise.
- You will see the rotation of the x-axis label.
How to Rotate Text in Excel at a Custom Angle
- Select range B4:F4 >> go to the Home tab >> select Orientation from the Alignment group >> select Format Cell Alignment option.
- This will open the Alignment tab of the Format Cells dialog box.
- You can rotate the text at any angle you want. Put 90 in the Degrees bar to rotate the text vertically and press OK.
- You will see the vertically rotated text in range B4:F4. Using these steps you can write vertically in Excel.
How to Change the Text Orientation Back to Horizontal
1. Use Format Cells Dialog Box
- Select range B4:F4.
- Open the Alignment tab of the Format Cells dialog box following the previous method.
- Put 0 in the Degrees bar and click OK.
- The text will change back to horizontal orientation.
2. Apply VBA Macro
- Open VBA Macro Editor >> paste the following code in the window >> press the Run button or F5 key to run the code.
Sub Rotate_Text_Horizontal()
   'variable declaration
   Dim WS As Worksheet
   Dim myRng As Range
   'set variable
   Set WS = ActiveSheet
   Set myRng = WS.Range("B4:F4")
   'rotate text
   With myRng
       .Orientation = 0
   End With
End Sub
- You will see the texts in range B4:H4 in horizontal direction.
How to Align a Column or Row
- Select range B4:F14. You can choose a single cell, a range of cells, a column or columns, a row or rows, or even the entire worksheet.
- Go to the Home tab >> select a vertical alignment option.
- Similarly, select a horizontal alignment option.
Why Rotate Text in Excel?
- To satisfy users’ preferences.
- To fit the width of the content in the column.
- To give a different perspective to a particular text.
- To make longer text contents visible.
- To improve the overall appearance of your worksheet.
- To accommodate longer text in a smaller space.
Things to Remember
There are a few things to remember in Excel to rotate text.
- Select the proper cell or range of cells.
- Navigate to the Alignment tab while using the Format Cells dialog box.
- Adjust column width and height accordingly.
Frequently Asked Questions
1. Will rotating text in Excel affect the cell’s formatting or alignment?
No, text rotating in Excel does not affect the formatting or alignment of the cell. However, you may need to adjust the height and width of the cell.
2. Can I rotate only a portion of the text within a cell in Excel?
No, Excel does not provide an option to rotate only a portion of the text within a cell.
3. Can I rotate text vertically in Excel?
Yes, you can rotate text vertically or at 90 degrees in Excel.
Excel Rotate Text: Knowledge Hub
- Difference Between Alignment and Orientation in Excel
- How to Rotate Text by 180 Degrees
- How to Mirror Text in Excel
- How to Change Orientation from Horizontal to Vertical in Excel
- How to Change Orientation of Text to 22 Degrees in Excel
Conclusion
In this article, we have presented various methods in Excel to rotate text. We have also offered methods to get texts in horizontal orientation. If you have any questions regarding this essay, don’t hesitate to let us know in the comments. Also, if you want to see more Excel content like this, please visit our website, and unlock a great resource for Excel-related content.
<< Go Back to Text Formatting | Learn Excel