How to flip text in Excel.
In Excel, flipping text can refer to what meaning you make of it depending on your preference. For example, flipping text can mean just to rotate the direction of text or it could mean to flip or reverse the contents of a cell. You can rotate text to fit the width of the content in the column or to provide a different perspective of a particular text. By rotating a text, you can make other texts visible and also enhance the overall appearance of the spreadsheet. Additionally, if you rotate, you can accommodate more text in a smaller space.
Therefore, in this tutorial, we’ll discuss both cases which are as follows;
- Reverse the text inside the cell through User Defined Function
- Change the orientation of text inside the cell
Consider an example of an Excel table consisting of the list of sales made every month by the employees of a company. As you can see the headers for the columns are bigger than the content. As a result, the months of November ($) and December ($) are not visible unless you scroll. Additionally, having only 10 entries at the bottom of the spreadsheet makes it look barren. So, to overcome this you can rotate the text in the headers.
Method – 1 Reversing the text by creating the User Defined Function
Step – 1 Open Visual basic dialogue box
- Hold down the ALT key and press F11, this will open the Microsoft Visual Basic for Applications window where you can enter the custom VBA code.
- Alternatively, you can go to developer in the ribbon and click on visual basic a dialogue box will appear.
- 2. Click Insert and in the dialogue box click on Module.
Step – 2 Write the code and go to excel sheet
- In the Module window write the following code
|Function ReverseStr(str As String) As String|
Reversestr = StrReverse(Trim(str))
- Save it and then go to your Excel sheet.
Step – 3 Enter the formula
- Through that very simple VBA code, we have actually created a User Defined Function, which can then be accessed from the sheet just like any other built-in functions of Excel. This function will appear in the list of suggestions by Excel as well when you will start to type the function as shown in the image.
- Now in your Excel sheet enter the following formula with respect to your cell which text you want to flip
- Enter this formula in an empty cell
- Press enter now your text has been flipped
- You can drag the cell with the formula to apply it to other cells as shown.
Method – 2 Using the Text Alignment options
In this method we’ll change the orientation of the text inside the cell by employing the Home tab’s alignment options. The details are explained in below mentioned steps.
Step – 1 Select Orientation
- First select the text you want to rotate.
- Go to the Home tab. Under Alignment, click on Orientation.
Step – 2 Selecting Angle Counterclockwise
- Clicking on the Orientation button drops down a list of ways you want to rotate the text. Select the orientation type you want to alter the text to.
- Selecting Angle Counterclockwise will rotate the text based on your selection. It can be seen that the text is rotated to a certain angle. In this case, the texts are rotated by an angle of 45°.
- We have used only one option in this case for the purpose of demonstration, you may use any other option which suits your requirements.
Method – 3 Using Alignment Launcher and Format Cells Dialog box
In this method we’ll use the Alignment group launcher to open up the format cells dialog box and then use the appropriate options to change the orientation of the text inside the cell as explained in the steps below.
Step – 1 Click on the Alignment setting
- Select the text you want to format.
- Go to Home and click on the Alignment setting under the Alignment section
- When you click on the Alignment setting the Format cells dialog box will be opened.
Step – 2 Go to the Alignment tab
- Once the format cells dialog box opens, click on the Alignment tab.
- In the dialog box, under the Alignment tab, you can see a dial-shaped feature in the orientation to the right.
- To rotate the text to a precise angle, you can either enter the degree you want to rotate the text to or drag the dial to set the degree of rotation of the text.
Step – 3 Apply the setting.
- As you drag the dial, the angle automatically adjusts. This way you can know and set the degree of rotation for the text after adjusting Click OK.