How to Change Alignment to the Right in Excel (5 Quick Methods)

Looking for ways to change the alignment to the right in Excel? Then, you’ve come to the right place. In fact, this article demonstrates 5 ways you can change alignment in Excel to the right.


Download Practice Workbook

You can download the practice workbook from the link below.


5 Ways to Change Alignment in Excel to the Right 

Aligning text or numbers is a formatting property that determines how a paragraph of text appears. So, without further delay, let’s explore the methods of aligning text one by one.
Throughout this article, we’ll be using the dataset containing Best Selling Books shown in the B4:C14 cells below. Here, the dataset shows the Product ID and the names of the Best Seller books respectively.

Dataset 1

We have used Microsoft Excel 365 version here, you can use any other versions according to your convenience.


Method-1: Using Ribbon to Change Alignment in Excel to Right

Let’s start things off with the most popular method i.e. using Excel’s Ribbon tool to right-align the contents of a cell. So, just follow along.

Steps:

  • Initially, select the C5:C14 cells.
  • Then, go to the Home tab located at the top left corner.
  • Next, in the Alignment section, click the Align Right button.

Using Ribbon

That’s it, you’ve right-aligned all the texts as shown in the image below.

Change Alignment in Excel to the Right Using Ribbon

Read More: How to Align Text in Excel (3 Quick Methods)


Method-2: Change Alignment to Right Using Keyboard Shortcuts

If you’re wondering about keyboard shortcuts to right-align text, then I have some good news for you. Now, allow me to demonstrate the procedure below.

Steps:

  • At the very beginning, select the C5:C14 range of cells.
  • Now, on your keyboard press the ALT + H keys.

Using Keyboard Shortcut

After completing the above steps, the Key Tips shortcuts appear in the Home tab.

  • Following this, press the A + R keys on your keyboard.

Change Alignment in Excel to the Right Using Keyboard Shortcut

This completes the process of aligning the text to the right.

Change Alignment in Excel to the Right Using Keyboard Shortcut

Read More: How to Left Align in Excel (3 Handy Ways)


Method-3: Aligning Text to Right with Format Cells Wizard

For our third method, we’ll use the Format Cells dialog box to right-align text. So, just follow these simple steps.

Steps:

  • Firstly, select the C5:C14 cells, and press CTRL + 1 on your keyboard.

Using Format Cells Wizard

After that, the Format Cells dialog box will open up.

  • Then, select the Alignment tab >> in the Horizontal field, click the drop-down >> choose the Right (Indent) option >> press OK.

Change Alignment in Excel to the Right Using Format Cells Wizard

The results should look like the picture shown below.

Change Alignment in Excel to the Right Using Format Cells Wizard

Read More: How to Apply Center Horizontal Alignment in Excel (3 Quick Tricks)


Method-4: Utilizing Custom Number Format

Another quick way to right-align text involves the use of a custom Number Format. This method is somewhat similar to the previous method so let’s begin.

Steps:

  • Similar to the previous method, select the C5:C14 cells >> press CTRL + 1 key.

Using Custom Number Format

Likewise, the Format Cells dialog box will pop up.

  • In turn, go to the Number tab >> select Custom in the Category field >> in the Type field enter the expression * @ >> press OK.

In the above expression, the Asterisk (*) symbol repeats the characters after it until the cell is filled. Next, the Space ( ) character is combined with the Asterisk to change text alignment. Lastly, the At (@) sign holds the string of text.

Change Alignment in Excel to the Right Using Custom Number Format

This gives the following results as shown in the screenshot below.

Change Alignment in Excel to the Right Using Custom Number Format


Method-5: Applying VBA Code to Align Text

Have you ever thought of automating the same boring and repetitive steps in Excel?
Think no more, because VBA has you covered. In fact, you can automate the prior methods entirely with the help of VBA code. It’s simple & easy, just follow along.


Step-01: Open Visual Basic Editor

  • Firstly, select the C5:C14 cells >> navigate to the Developer tab >> click the Visual Basic button.

Using VBA Code

This opens the Visual Basic Editor in a new window.


Step-02: Insert VBA Code

  • Secondly, choose the Sheet where you want to insert a Module.
  • Next, go to the Insert tab >> select Module.

Change Alignment in Excel to the Right Using VBA Code

For your ease of reference, you can copy the code from here and paste it into the window as shown below.

'This is sub routine for right-aligning a range of cells
Sub ExcelRightAlign()
'Using the Selection and Horizontal Alignment properties
 Selection.HorizontalAlignment = xlRight
End Sub

Change Alignment in Excel to the Right Using VBA Code

Code Breakdown:
Now, I will explain the VBA code used to right-align text. In this case, the code is divided into two steps.

  • Firstly, the sub-routine is given a name.
  • Secondly, the Selection property selects the cells, in this case, C5:C14 cells.

VBA Code Explanation


Step-03: Running VBA Code

  • Thirdly, close the Visual Basic editor and select the cells where you want to change alignment.
  • Following this, click the Macros button in the Developer tab.

Change Alignment in Excel to the Right Using VBA Code

After completing this step, the Macro wizard appears.

  • Now, click Run to execute the Macro.

Change Alignment in Excel to the Right Using VBA Code

Just like that, the text in the selected cells becomes right-aligned, it’s that easy.

Change Alignment in Excel to the Right Using VBA Code

Read More: How to Center Text in a Cell in Excel (3 Easy Methods)


Conclusion

This article provides quick and easy answers to how to change alignment in excel to the right. Make sure to download the practice files. Hope you found it helpful. Please inform us in the comment section about your experience. We, the Exceldemy team, are happy to answer your queries. Keep learning and keep growing!


Related Articles

Eshrak Kader

Eshrak Kader

Hello! Welcome to my Profile. I completed my BSc. at Bangladesh University of Engineering & Technology from the Department of Naval Architecture & Marine Engineering. Currently, I am conducting research & posting articles related to Microsoft Excel. I am passionate about research & development and finding innovative solutions to problems.

We will be happy to hear your thoughts

Leave a reply

ExcelDemy
Logo