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

Method 1 – Using Ribbon to Center Text in a Cell in Excel

1.1 Use Center Align Option

Steps:

  • Select the whole data table and go to the Home tab.
  • Click on the Center option from Alignment in the upper ribbon portion.

Using Excel Ribbon to Center Text in a Cell

  • The text will be aligned in the center.

Using Excel Ribbon to Center Text in a Cell


1.2 Utilize Format Option

Steps:

  • Select the whole data table and go to the Home tab.
  • Choose the Format Cells option from the Format tab.

 

Excel Ribbon to Center Text in a Cell

  • The Format Cells window will open.
  • Go to the Alignment option.
  • Select the Center option in both Horizontal and Vertical under Text alignment.
  • Press OK to get the desired result.

Using Excel Ribbon to Center Text in a Cell

  • All text will be in the center.


Method 2 – Center Text in a Cell in Excel Using Context Menu

Steps:

  • Select the whole data table and Right-Click on the table.
  • Choose the Format Cells tab.

Center Text in a Cell in Excel Using Context Menu

  • The Format Cells window will open. Select Alignment and go to the Text alignment option to choose the Center option in both the Horizontal and Vertical alignment.

  • Press OK.


Method 3 – Applying Excel VBA Code to Center Text in a Cell

Steps:

  • Select the data table and press Alt+F11 to open the VBA Code window.
  • Go to the Insert tab and select the Module option to open a new module window.

pplying VBA Code to Center Text

  • In the new module window, insert the following code:
Sub CenterTextHorizontallyAndVertically()

Selection.HorizontalAlignment = xlCenter

Selection.VerticalAlignment = xlCenter

End Sub

pplying VBA Code to Center Text

  • Click on the Run tab or press F5 to run the code.

pplying VBA Code to Center Text

  • It will center align all the text.


How to Center Text Across Multiple Cells in Excel

Steps:

  • In cell B2, we have Centering Text Across Multiple Cells.
  • We want to make the writing headings of both Column B and Column C.

  • Select both cells B2 and C2.
  • Go to the Home tab and click on the Merge and Center option.

  • The result will look like the image below.


Download Practice Workbook

 

Related Articles


<< Go Back to Alignment in Excel | Excel Cell FormatLearn Excel

Get FREE Advanced Excel Exercises with Solutions!
Zehad Rian Jim
Zehad Rian Jim

Zehad Rian Jim is a dedicated professional with a BSc. Degree in Naval Architecture and Marine Engineering from Bangladesh University of Engineering and Technology. He's good with Microsoft Office and has written more than 80 helpful articles for ExcelDemy in the last year. Now, he makes fun and easy-to-follow Excel tutorials for YouTube as part of the ExcelDemy Video project. Zehad loves figuring out Excel problems, and his passion for learning new things in Excel shines through in... Read Full Bio

We will be happy to hear your thoughts

Leave a reply

Advanced Excel Exercises with Solutions PDF

 

 

ExcelDemy
Logo