Method 1 – Using the Accent Option
- Click the Insert tab.
- Click on Symbols followed by Equation.
- Choose Accent and select Bar.
- A text box with a Bar on the top will appear.
- Enter your desired text in the text box. The bar will appear over the text.
- Drag the text box to your desired cell and adjust its size.
- You’ll get overlined text in the cell.
Method 2 – Combining REPT, LEN, and CHAR Functions
- Insert a column named Overlined Text.
- Select the entire column and turn on Wrap Text from the Home tab.
- Enter the following formula in cell D5:
=REPT("_",LEN(C5))&CHAR(10)&C5
- CHAR(10) adds a line break in the cell.
- LEN(C5) returns the number of characters in a text string. It will return 8 in this case.
- REPT(“_”,LEN(C5))&CHAR(10)&C5 repeats the “_” symbol 8 times as the number of characters is 8 in cell C5.
- Press Enter to create overlined text.
- AutoFill the formula to the other cells in column D.
Method 3 – Using Keyboard Shortcuts
- Enter “_” before the text in your desired cell.
- Repeat the symbol for each character you want to overline.
- Keep the cursor between the symbols and text.
- Press Alt+Enter to add a line break.
Method 4 – Insert Shapes Feature to Overline Text in Excel
- Go to the Insert tab.
- Click on Shapes followed by Lines
- Use your mouse to draw a line above the text.
- Customize the line color and width.
- Adjust the cell height to make the overlined text visible.
- Ensure proper cell references for desired results.
Download Practice Workbook
You can download the practice workbook from here:
Related Articles
<< Go Back to Text Formatting | Learn Excel
Get FREE Advanced Excel Exercises with Solutions!