8 Ways to Rotate Text in Microsoft Excel

If you want to give a fresh look to column headers of your Excel worksheet by rotating text, read this ultimate tutorial that explains how to rotate text in Excel in various ways.

Microsoft Excel comes with elegant object visualization tools to make your reports creative, presentable, and professional. One such tool is the text orientation tool within a 2-D and 3-D space.

If you’re not familiar with the process, no worries—I’ll guide you through it. Below, I’ll outline different methods, catering to various skill levels in Excel, so you can choose the approach that aligns with your expertise, whether you’re a beginner or an advanced user.

Reasons to Rotate Text in Excel

Here are the situations and reasons why you might want to rotate texts in Excel:

  • Rotating text allows you to fit longer labels or headers into narrow columns without compromising readability.
  • Text rotation can also enhance the visual appeal of your Excel sheets by providing a more dynamic layout.
  • You can use rotated text to emphasize column or row headings, making them stand out more prominently.
  • You can use rotating texts in dashboards to present information at an angle, aiding in better data visualization.
  • In some languages, symbols, or characters are traditionally written vertically. Rotating text allows for proper representation.
  • When working with time series data, rotating text can be useful to display dates or time intervals along the axis.

Rotate Text in Excel Using Shortcut Keys

This is a quick method to change the rotation of texts in Excel worksheet cells in bulk or selectively. You can select one cell, multiple non-adjacent cells, and a cell range and follow the instructions below to rotate texts:

Angle clockwise
Angle clockwise

Press the following keys in the order indicated by the right-pointing arrows to rotate texts clockwise.

Alt > H > FQ > L

Find below other key combinations you can use in place of L (clockwise):

Alt > H > FQ > O (rotate counter-clockwise)

Alt > H > FQ > V (rotate vertically)

Alt > H > FQ > U (rotate upwards)

Alt > H > FQ > D (rotate downwards)

Rotate Text in Excel Using the Orientation Command

If the above shortcut keys don’t work for you, try interacting directly with the Orientation command, and the Excel ribbon button to rotate text.

Orientation command in Excel
Orientation command in Excel

Highlight the text you want to rotate and go to Home > Alignment. There, you should see the Orientation button just above the Decrease Indent command. Click the Orientation drop-down arrow.

On the Orientation drop-down list, you should see various ways to rotate the selected texts, like Angle Counterclockwise, Angle Colckwise, etc. Click on any of these options to rotate the text orientation.

Use the Quick Access Toolbar for Quick Access

If you often use the Orientation command on Excel via keyboard shortcuts, you should add the command in the Quick Access Toolbar (QAT).

Shortcut for orientation
Shortcut for orientation

The shortcut to any QAT command is fairly simple than others in Excel. You just press the Alt key and the serial number of the command, like 5 for the Orientation command on my Excel software. It could be different on your Excel desktop app.

Open Excel Options
Open Excel Options

To include the Orientation command, click on the File tab of your Excel workbook and choose More > Options. The Excel Options dialog will show up.

Excel Options
Excel Options

There, select the Quick Access Toolbar category from the left-side panel and switch to the Home tab for the Choose commands from list. Scroll down to find Orientation, select it, and click the Add button to include the command in the right-side menu. Click OK to save the changes you made.

QAT angle clockwise
QAT angle clockwise

Now, highlight any text you want to rotate, and press the shortcut for the QAT Orientation command, for example, Alt + 5, to choose a quick text rotation option.

Rotate Text in Excel Using Using the Format Cells Tool

The methods you tried so far only offer fixed text rotation options. If you want a custom angle, you need to use the Format Cells tool. It offers an extensive list of text alignment options like horizontal text alignment, vertical text alignment, text controls, text directions, and angled text orientations.

Use shortcut to launch format cells
Use shortcut to launch format cells

Select the texts you want to rotate in your Excel worksheet and press the Ctrl + 1 keys to launch the Format Cells dialog.

Format cells dialog with alignment
Format cells dialog with alignment

You should be in the Number tab of Format Cells. Navigate to the Alignment tab. For text rotation, you mostly need to use the Orientation panel. It has an angle setting panel. Click on the Text line and move the mouse cursor from top to bottom or bottom to top to change the text angle. Click OK to implement the new text orientation in your worksheet.

Rotate Text in Excel Using WordArt

WordArt enables you to add stylish text to your Excel worksheet. If you have added text using this tool but don’t know how to rotate the text to enhance visual appeal, follow the steps mentioned below.

Format text effects
Format text effects

Click on the WordArt text box and right-click to bring up a context menu. There, click on the Format Text Effects option.

Text options
Text options

The Format Shape panel will show up on the right side of the worksheet. Also, Excel will automatically select the Text Options menu on Format Shape.

Text direction
Text direction

To try a 2-D text rotation, go to the Text Box menu and click on the Text direction drop-down menu. Choose a text rotation style from the four available options in the list.

3-D rotation of WordArt
3-D rotation of WordArt

For a 3-D text rotation, you need to navigate to the Text Effects menu of Format Shape. Click on the 3-D Rotation menu to expand its options. Click on the Presets box and choose a 3-D rotation of your choice.

Rotate Text in Excel of a Text Box

When you create macro buttons or dashboard items, you often use the Text Box tool in Excel. If you want to rotate the texts you write on a Text Box but don’t know how I’ll show you below.

Text box format effects
Text box format effects

Highlight the Text Box you added to your worksheet and right-click. On the contextual menu, click on the Format Text Effects option.

The Format Shape menu will open on the right-side edge of the Excel app. From here, you can apply 2-D and 3-D text rotation to Text Box content. Just follow the steps mentioned earlier in the WordArt section to rotate texts in this Text Box.

Rotate Text in Excel Using the Chart Formatting Tools

Another place where you can have texts and need to rotate those is an Excel chart. There are various text elements on an Excel chart. Among many options, you mostly need to change the rotation of texts that appear on the X-axis series, Y-axis series, chart data labels, chart legends, and chart titles.

Custom angles for chart axis labels
Custom angles for chart axis labels

Suppose, you want to change the X-axis series labels. Click on the chart axis label text to select all. Now, you can follow the previously mentioned steps to change text orientation using the options available in Format Axis > Text Options > Text Box.

Format axis custom angle
Format axis custom angle

Now, instead of using the Text direction drop-down menu which has limited text rotation options, you can use the Custom angle box. Enter a value for the orientation angle or use the arrows to get the rotation angle you’re looking for.

Rotate Text in Excel Using Excel VBA

A quick way to intuitively change the text orientation angle is Excel VBA macro. It allows you to automate the whole process of selecting a cell range, going to the Orientation command, and selecting a text orientation angle.

Below, I’m sharing a VBA script to automate text rotation. The macro will ask you to enter the cell reference and orientation angle. The orientation angle must range from +90 to -90. You just enter the values between this range, no need to use the degree symbol in the input box.

Sub RotateText()
    Dim selectedRange As Range
    Dim rotationAngle As Double
    Dim cell As Range
    
    ' Select cells using input box
    On Error Resume Next
    Set selectedRange = Application.InputBox("Select cells to rotate", Type:=8)
    On Error GoTo 0
    
    ' Exit if user clicks Cancel
    If selectedRange Is Nothing Then
        Exit Sub
    End If
    
    ' Get rotation angle from user
    On Error Resume Next
    rotationAngle = Application.InputBox("Enter rotation angle (in degrees)", Type:=1)
    On Error GoTo 0
    
    ' Exit if user clicks Cancel or enters a non-numeric value
    If rotationAngle = 0 Then
        Exit Sub
    End If
    
    ' Rotate text in the selected range
    For Each cell In selectedRange
        If Not IsEmpty(cell.Value) Then ' Check if the cell is not empty
            cell.Orientation = rotationAngle
        End If
    Next cell
End Sub
  

Here’s how you can use the above script to create a VBA macro:

Developer visual basic
Developer visual basic

Go to the Developer tab and click on the Visual Basic button to launch the Excel VBA Editor tool. There, click on the Insert button and choose Module.

A VBA script to rotate text
A VBA script to rotate text

Within the blank module, copy and paste the above-mentioned script. Click the Save button and hit No to bring up the Save As dialog box.

Save as type
Save as type

On the Save As dialog, click the Save as type drop-down and choose Excel Macro-Enabled Workbook (XLSM) file type. Click the Save button to save the macro.

Running a macro
Running a macro

Now, press Alt + F8 to launch the macro dialog and choose the RotateText macro. Hit Run to execute the macro.

Input cell range
Input cell range

Choose a cell range that contains texts.

Input text angle
Input text angle

Also, enter an angle of orientation.

Orientation changed using VBA
Orientation changed using VBA

You should see that Excel changed the text rotation angle according to the orientation you selected in the macro.

Note: Before using this macro, save your workbook. You won’t be able to undo any changes made using a VBA script.

Rotate Text in Excel Using Office Scripts

You can use an Office Scripts script when you’re creating advanced Excel automation using Power Automate and Office Scripts and need to rotate texts in Excel. This feature is only available when you use Microsoft 365 Business Standard or a better subscription.

Using office scripts to change text rotation
Using office scripts to change text rotation

Go to your worksheet containing the texts and click on the Automate tab. There, go to the Scripting Tools block and click on the New Script button. This will open the Office Scripts Code Editor on the right edge of the Excel desktop app.

Office Scripts code editor
Office Scripts code editor

Copy and paste the following script inside the Code Editor panel and click on the Save script button. Now, highlight a cell or a cell range and click the Run button to execute the script.

function main(workbook: ExcelScript.Workbook) {
  const activeWorksheet = workbook.getActiveWorksheet();
  const selectedRange = workbook.getSelectedRange();

  // Access the format object correctly
  selectedRange.getFormat().setTextOrientation(45);
}

Excel will automatically rotate the texts according to the angle of orientation mentioned in the Office Scripts script.

If you want to get a different angle of orientation, you can enter that in the code element setTextOrientation(45) of the script. For example, to get a 50° angle, use this code element setTextOrientation(50).

How to Undo Text Rotation in Excel

Usually, you need to reverse the steps you’ve taken to undo the text rotation.

Undo text rotation from orientation
Undo text rotation from orientation

For example, if you’ve used the Orientation button to get the Angle Counterclockwise text rotation, you need to click the same button to return the texts to their original format.

If you don’t know the method of implementing text rotation, undoing the orientation angle could be a challenge. Here comes the Clear command in Excel.

Clear formats
Clear formats

Simply highlight the texts from which you want to remove custom angle orientation. Now, go to the Editing commands block on the Home tab and click on the Clear drop-down menu. There, select the Clear Formats option to undo text rotation instantly.

Conclusions

Mastering the skill of rotating text in Excel can significantly enhance your Excel worksheet presentation and improve overall data visualization. By exploring the various techniques outlined in this blog, from using the basic text rotation options to employing custom angles and orientation, you have unlocked a range of tools that can make your data more accessible and aesthetically pleasing.

Comment below if the article helped or if you’ve got feedback regarding the article.

About the Author

Bipasha Nath

Bipasha Nath

Bipasha is a technical content writer with 10+ years of experience in the technology industry. She previously worked in a SaaS software development company focused on SharePoint, OneDrive, Word, Excel, Word solutions.

Subscribe

Subscribe for awesome Microsoft Excel videos 😃

John MacDougall

I’m John, and my goal is to help you Excel!

You’ll find a ton of awesome tips, tricks, tutorials, and templates here to help you save time and effort in your work.

Related Posts

Comments

0 Comments

Submit a Comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Get the Latest Microsoft Excel Tips

Follow Us

Follow us to stay up to date with the latest in Microsoft Excel!

Subscribe for awesome Microsoft Excel videos 😃