If you have a spreadsheet where the text in your column headings (not the lettered column headings) is longer than the text in the columns, and there are a lot of columns, you may want to rotate the text in your headings so the columns become narrower.
NOTE: We used Excel 2013 to illustrate this feature.
This also allows you to fit more columns of data in a smaller area. To rotate the text in cells, first highlight the cells you that contain the text you want to rotate. Make sure the “Home” tab is active and click the “Orientation” button in the “Alignment” section of the “Home” tab (the button with the slanted text). Select an option to rotate the text. The icons to the left of the options show which way the text will rotate.
The text is rotated in the chosen direction in the selected cells.
For more fine-tune control when rotating your text, highlight the cells containing the text you want to rotate and click the “Alignment Settings” button in the lower-right corner of the “Alignment” section of the “Home” tab.
The “Format Cells” dialog box displays. The “Alignment” tab automatically displays. To rotate the text, click on any point along the semicircle in the “Orientation” box. The number of degrees of the rotation displays in the “Degrees” edit box. If you know the specific number of degrees you want to rotate the text, type the number directly into the “Degrees” edit box, or use the spinner arrow buttons to select a number.
If you want the text to be vertical in a cell (each character takes up one line), click the box to the left of the semicircle angle box in the “Orientation” but (the box with the word “Text” in a vertical format). The button turns black to show that the option is on and your text will look like the first cell in the image below once you click “OK” on the “Format Cells” dialog box.
To reverse the rotation of your text and display it normally, simply go back to the “Alignment” tab on the “Format Cells” dialog box and enter “0” (that’s a zero, not the letter “O”) in the “Degrees” edit box. To reverse vertical text, simply click the vertical text button on the “Alignment” tab so the button is not black.
Rotate a Text: The Excel features allow the user to change the text orientation in a cell. With the help of the “Rotate” option, the user can rotate the text as per their convenience.
Jump To:
- Rotate a Text in Excel
- Verdict
Rotate a Text in Excel:
- Open a New Excel Workbook.
- Type any value in the cell.
- Select the cell that you want to rotate.
Sample Text
- Right-Click on the cell and then select the Format Cells option.
Select Format Cells Option
- Now, the Format Cells window will open.
Format Cells Window
- In the Format Cells window, choose the number of degrees to rotate the text.
- Now, you can find the changes in the selected text.
Text After the rotation
Verdict:
We hope that this article illustrated the complete information about Text Rotation in Excel 365. Mention your queries/suggestions in the comment section. Stay connected to get instant updates. Thank you for visiting our website GeekExcel.
The Story So Far…
Our series of posts on Excel VBA Macros began with these posts:
If you have not already read them, I would suggest going through them now before continuing. The last post contained a lot of information and don’t worry if you feel like it was too much to take in at once – over the coming weeks we are going to build up the Macro one piece at a time.
In prior posts, we were working on a report that had to be formatted.
The original format was like this…
The finished report will look like this….
Download this file, which you will be working from : Macros_Example_2
Create A Module
Before you start writing a Macro, you need somewhere to create it!
With the file open, go to your Visual Basic Editor (VBE) by pressing Alt+F11 together.
- Go To “Insert”
- Select “Module” from the menu
- Find your module in the Project window
- If needed, expand the “Modules” folder
- Double click on your module name (first defaults to “Module1”).
You are now ready to start writing your Macro.
Create A Macro
All the Macros we will be dealing with for now will be created by typing “Sub”, then the Macro name, followed by two brackets”()”.
There are many options when it comes to creating Macros, for now we will be doing them all this way.
To create your macro
- In your VBE, type “Sub” then the name of your macro followed by two brackets. I’m going to name my Macro “mySecondMacro”
- Hit the return key
- Note that when you press the return key, a line is skipped and then you see “End Sub”. This is the end of your Macro, you will type everything you need for the Macro between these two lines.
How To Change Text In A Cell
Code Snippet :
Range(“A1”).Select
ActiveCell.FormulaR1C1 = “Whatever You Want”
To change the text in a cell, first select it. In this example, cell A1 is being selected.
Then change the value in the active cell to whatever you want, just put it between double apostrophes.
Write The Code
In our project, we want to change the values in A1 to Item, B1 to Price, C1 to Quantity and D1 to Total.
We will select each cell, change the active cell formula to our new value and then move onto the next cell until all 4 are done.
Between your “Sub…” and “End Sub” lines, enter this code
- Range(“A1”).Select
- ActiveCell.FormulaR1C1 = “Item”
- Range(“B1”).Select
- ActiveCell.FormulaR1C1 = “Price”
- Range(“C1”).Select
- ActiveCell.FormulaR1C1 = “Quantity”
- Range(“D1”).Select
- ActiveCell.FormulaR1C1 = “Total”
Test The Code
- Close the VBE window
- In your normal Excel window, copy Sheet1
- In you copied sheet press Alt+F8 to run Macros
- Select your Macro from the list and Run
- You should see your headers change
TIP : We have 8 lines of code above, I don’t type out 8 lines of code, instead I write 2 lines and copy it 3 more times and then only change the parts of the code that I need to change.
Next time we will do some formatting on our headers by changing font size, color, alignment, etc.
In The Meantime….
Can’t wait to get a bit more into coding? Create your own file, it can be a blank file and you can use code to fill it in.
Try running the macro with Alt+F8, or see if you can remember how to create a button and assign the macro to it.
In this course:
If you want to change the way data appears in a cell, you can rotate the font angle, or change the text alignment.
Change the orientation of text in a cell
Select a cell, row, column, or a range.
Select Home > Orientation , and then select an option.
You can rotate your text up, down, clockwise, or counterclockwise, or align text vertically:
Rotate text to a precise angle
Select a cell, row, column, or a range.
Select Home > Orientation > Format Cell Alignment.
Under Orientation on the right side, in the Degrees box, use the up or down arrow to set the exact number of degrees that you want to rotate the selected cell text.
Positive numbers rotate the text upward. Negative numbers rotate the text downward.
Align a column or row
Begin by selecting the cell or cells you want to align. You can align text in a single cell, a range of cells, a row or rows, a column or columns, or the entire worksheet. (Use Ctrl+A to select all cells.)
Select the cells you want to align.
On the Home tab, in the Alignment group, select a horizontal alignment option:
On the Home tab, in the Alignment group, select a vertical alignment option:
Rotate text
We’re sorry. Excel for the web doesn’t have the font orientation option for you to apply vertical text or rotate text in an angle.
To express your interest in having this feature in Excel for the web, please go to the Visio Suggestion Box and click the Vote button.
If you have the Excel desktop application, you can use it to open your workbook and rotate text there.
Align text
The alignment options let you define the placement of text within a cell on the horizontal axis and on the vertical axis.
Select a cell, row, column, or a range.
On the Home tab, in the Alignment section, select an alignment option:
Indent text
You can indent text or undo an indent.
Select a cell, row, column, or a range.
On the Home tab, in the Alignment section, select an indent option:
Increase Indent shifts text rightward.
Decrease Indent shifts text leftward.
If you want to change the way data appears in a cell, you can rotate the font angle, or change the text alignment.
Change the orientation of text in a cell
Select a cell, row, column, or a range.
Select Home > Orientation , and then select an option.
You can rotate your text up, down, clockwise, or counterclockwise, or align text vertically:
Rotate text to a precise angle
Select a cell, row, column, or a range.
Select Home > Orientation > Format Cell Alignment.
Under Orientation on the right side, in the Degrees box, use the up or down arrow to set the exact number of degrees that you want to rotate the selected cell text.
Positive numbers rotate the text upward. Negative numbers rotate the text downward.
Align a column or row
Begin by selecting the cell or cells you want to align. You can align text in a single cell, a range of cells, a row or rows, a column or columns, or the entire worksheet. (Use ⌘+A to select all cells.)
Select the cells you want to align.
On the Home tab, select a horizontal alignment option:
On the Home tab, select a vertical alignment option:
Need more help?
You can always ask an expert in the Excel Tech Community or get support in the Answers community.
When I was working as a full-time analyst, one of my jobs was to prepare weekly reports for clients and stakeholders.
As a part of it, I had to make sure my reports were easy to read and also take less screen space (apparently, clients hate scrolling back and forth).
And the functionality of rotating text came in useful in such reports.
It’s especially useful when you have a bigger heading and a small number (as shown below). Here, headers in Row 1 take less space as these are at an angle (as compared to when they are horizontal).
In this tutorial, I will show you the step-by-step process to quickly rotate text in Excel.
This Tutorial Covers:
Rotate Text Using Ribbon Alignment Options
Suppose you have a dataset as shown below and you want to rotate the headings in the first row.
Below are the steps to rotate the text in the cells:
- Select all the cells (that has the headers)
- Click the Home tab
- In the Alignment group, click the ‘Orientation’ icon
- In the options that show up, click on the ‘Angle Counterclockwise’ option
The above steps would rotate the text in the selected cells by 45 degrees.
You can also choose the options such as Angle Clockwise or Rotate Text Up. While there are some other options as well, I don’t use them (and not sure if anyone does).
While this is a quick way to rotate text in a cell, it gives you limited options. For example, what if you want the angle of the rotation a little more than 45 degrees (say 60 degrees).
You can do that as well, but for that, you need to use the next method covered in this tutorial.
Rotate Text Using Ribbon Format Cells Dialog Box
This is a slightly longer method (takes a few extra clicks), but gives you a lot more control.
Suppose you have a dataset as shown below and you want to rotate the headings in the first row.
Below are the steps to do this:
- Select all the cells (that has the headers)
- Click the Home tab
- In the Alignment group, click the ‘Orientation’ icon
- In the options that show up, click on the ‘Format Cells Alignment’ option
- In the orientation section, enter the degrees by which you want the text to be rotated.
- Close the dialog box
You can also click on the red dot in the Orientation option and use the mouse to get the desired alignment.
Keyboard Shortcut to Rotate Text in Excel
If rotating the text is something you need to do a lot often, getting used to the shortcut to do this could save you some time.
Below is the keyboard shortcut to rotate text in the selected cells
It’s a long keyboard shortcut, but still, the fastest way if you need to use this setting regularly.
Change the Text Orientation Back to Horizontal (Default State)
If you want to remove the rotated text and get back the regular horizontal text, you need to go back and disable the current setting (which you can do by clicking on the same option in the ribbon again).
For example, if you have the text in the Angle Counterclockwise setting, go to the same option and click on it again (it works as a toggle).
Or you can use the Alignment dialog box (the second method covered in this tutorial) and set the orientation degrees to 0.
So these are some of the ways you can quickly rotate text in Excel.
I hope you found this tutorial useful!
Other Excel tutorials you may also like:
In this article, you will cover to rotate Text clockwise, anticlockwise at a certain degree moreover, the same you can apply on the data label of an Excel Chart.
Download Your Example Excel File
While writing this I used Office 365, however, anyone using Excel 2016, Excel 2013 and even prior editions of Excel should be able to follow along with the content.
If you have work with data in Excel, you may have noticed that it becomes difficult to manage the Column width and contents within a column. Some cell contents are long, and some are short resulting different size of columns.
To make sure the width of the column is equal we create unnecessary space as you can see in the image below that the width of each column is equal but occupy redundant space as well. The width is decided based on the most extended text, i.e., September in our example.
You can also use Wrap or Shrink tool so that data is visible with equal columns breadth, but again that’s not the best option. As the height of columns increases using the Wrap option and Text compress using the Shrink option.
Let’s check a couple of different options;
To adjust the column width in Excel
To make sure that the Text size is equal (no shrink) and occupy a minimal area of a column as per the text length. Select column C to N and then double click any of the selected boundaries between two column letters (Image below). Shortcut to resize all selected Column at once use Alt+H+O+I
The action reduces the redundant space but results in columns with different width. This option does not sound great due to its uneven presentation of column size.
In such a situation, we can use Rotate Text option and align them correctly for a better appearance.
Rotate Excel Cell Data
Sometimes we want to use alignment based on the headings of each column. As you can see in the image above that the width of each column is not equal but does not occupy redundant space, smallest column of month is ‘May.’
The suitable option, in this case, is to Rotate Text under Alignment, Follow the below step:
This article will show you methods of putting multiple lines of text in one cell, as well as removing multiple lines in one cell at once in Excel.
For cell with long texts beyond your cell, you can auto adjust the texts into multiple lines for fitting the cell width with formatting the cell as wrap text.
1. Right click the cell you want to put multiple lines, then click Format Cells. See screenshot:
2. In the Format Cells dialog box, check the Wrap text box under the Alignment tab, and then click the OK button.
Note: You can also just click Home > Wrap Text to put the overwriting text string to multiple lines.
Easily remove all line breaks from selected cells in Excel:
If you want to remove all line breaks from specific cells, the Remove Characters utility of Kutools for Excel can do you a favor. See the below demo.
Download the full feature 30-day free trail of Kutools for Excel now!
You can put multiple lines in a cell with pressing Alt + Enter keys simultaneously while entering texts.
Pressing the Alt + Enter keys simultaneously helps you separate texts with different lines in one cell. With this shortcut key, you can split the cell contents into multiple lines at any position as you need.
If you want to remove all multi lines from cells, you can try the Remove Characters utility of Kutools for Excel.
Before applying Kutools for Excel, please download and install it firstly.
1. Select the cells you want to remove multi lines from, and click Kutools > Text > Remove Characters. See screenshot:
2. In the Remove Characters dialog box, only check the Non-printing box, and then click the OK button.
Now all multi lines in selected cells are removed immediately.
If you want to have a free trial ( 30-day) of this utility, please click to download it, and then go to apply the operation according above steps.
Office Tab – Tabbed Browsing, Editing, and Managing of Workbooks in Excel:
Office Tab brings the tabbed interface as seen in web browsers such as Google Chrome, Internet Explorer new versions and Firefox to Microsoft Excel. It will be a time-saving tool and irreplaceble in your work. See below demo:
When I was working as a full-time analyst, one of my jobs was to prepare weekly reports for clients and stakeholders.
As a part of it, I had to make sure my reports were easy to read and also take less screen space (apparently, clients hate scrolling back and forth).
And the functionality of rotating text came in useful in such reports.
It’s especially useful when you have a bigger heading and a small number (as shown below). Here, headers in Row 1 take less space as these are at an angle (as compared to when they are horizontal).
In this tutorial, I will show you the step-by-step process to quickly rotate text in Excel.
This Tutorial Covers:
Rotate Text Using Ribbon Alignment Options
Suppose you have a dataset as shown below and you want to rotate the headings in the first row.
Below are the steps to rotate the text in the cells:
- Select all the cells (that has the headers)
- Click the Home tab
- In the Alignment group, click the ‘Orientation’ icon
- In the options that show up, click on the ‘Angle Counterclockwise’ option
The above steps would rotate the text in the selected cells by 45 degrees.
You can also choose the options such as Angle Clockwise or Rotate Text Up. While there are some other options as well, I don’t use them (and not sure if anyone does).
While this is a quick way to rotate text in a cell, it gives you limited options. For example, what if you want the angle of the rotation a little more than 45 degrees (say 60 degrees).
You can do that as well, but for that, you need to use the next method covered in this tutorial.
Rotate Text Using Ribbon Format Cells Dialog Box
This is a slightly longer method (takes a few extra clicks), but gives you a lot more control.
Suppose you have a dataset as shown below and you want to rotate the headings in the first row.
Below are the steps to do this:
- Select all the cells (that has the headers)
- Click the Home tab
- In the Alignment group, click the ‘Orientation’ icon
- In the options that show up, click on the ‘Format Cells Alignment’ option
- In the orientation section, enter the degrees by which you want the text to be rotated.
- Close the dialog box
You can also click on the red dot in the Orientation option and use the mouse to get the desired alignment.
Keyboard Shortcut to Rotate Text in Excel
If rotating the text is something you need to do a lot often, getting used to the shortcut to do this could save you some time.
Below is the keyboard shortcut to rotate text in the selected cells
It’s a long keyboard shortcut, but still, the fastest way if you need to use this setting regularly.
Change the Text Orientation Back to Horizontal (Default State)
If you want to remove the rotated text and get back the regular horizontal text, you need to go back and disable the current setting (which you can do by clicking on the same option in the ribbon again).
For example, if you have the text in the Angle Counterclockwise setting, go to the same option and click on it again (it works as a toggle).
Or you can use the Alignment dialog box (the second method covered in this tutorial) and set the orientation degrees to 0.
So these are some of the ways you can quickly rotate text in Excel.
I hope you found this tutorial useful!
Other Excel tutorials you may also like:
If you have a worksheet with data in columns that you need to rotate to rearrange it in rows, use the Transpose feature. With it, you can quickly switch data from columns to rows, or vice versa.
For example, if your data looks like this, with Sales Regions in the column headings and and Quarters along the left side:
The Transpose feature will rearrange the table such that the Quarters are showing in the column headings and the Sales Regions can be seen on the left, like this:
Note: If your data is in an Excel table, the Transpose feature won’t be available. You can convert the table to a range first, or you can use the TRANSPOSE function to rotate the rows and columns.
Here’s how to do it:
Select the range of data you want to rearrange, including any row or column labels, and press Ctrl+C.
Note: Ensure that you copy the data to do this, since using the Cut command or Ctrl+X won’t work.
Choose a new location in the worksheet where you want to paste the transposed table, ensuring that there is plenty of room to paste your data. The new table that you paste there will entirely overwrite any data / formatting that’s already there.
Right-click over the top-left cell of where you want to paste the transposed table, then choose Transpose .
After rotating the data successfully, you can delete the original table and the data in the new table will remain intact.
Tips for transposing your data
If your data includes formulas, Excel automatically updates them to match the new placement. Verify these formulas use absolute references—if they don’t, you can switch between relative, absolute, and mixed references before you rotate the data.
If you want to rotate your data frequently to view it from different angles, consider creating a PivotTable so that you can quickly pivot your data by dragging fields from the Rows area to the Columns area (or vice versa) in the PivotTable Field List.
You can paste data as transposed data within your workbook. Transpose reorients the content of copied cells when pasting. Data in rows is pasted into columns and vice versa.
Here’s how you can transpose cell content:
Copy the cell range.
Select the empty cells where you want to paste the transposed data.
On the Home tab, click the Paste icon, and select Paste Transpose.
Need more help?
You can always ask an expert in the Excel Tech Community or get support in the Answers community.