Skip to main content

How to bold only the first line or first word in cell in Excel?

Author Siluvia Last modified

When working with text in Excel, you may need to emphasize specific parts of the content within cells for better readability or presentation. For example, you might want to bold only the first line of text in a multi-line cell or highlight just the first word. In this article, we’ll explore various methods to bold only the first line or first word in Excel cells, catering to different levels of expertise and requirements.

Bold only the first line in cell using VBA code

Bold only the first word in cell using VBA code

Bold only the first word or first line in cell using Kutools AI


Bold only the first line in cell using VBA code

The following VBA code can help you quickly bold only the first line in selected cells. Please do as follows.

1. Press "Alt" + "F11" keys simultaneously to open the "Microsoft Visual Basic for Applications" window.

2. In the "Microsoft Visual Basic for Applications" window, click "Insert" > "Module". Then copy and paste the below VBA code into the Module window.

VBA code: Bold only the first line in cells

Option Explicit
Sub BoldFirstLine()
Dim xRng As Range, xCell As Range
Dim xFirstRow As String
On Error Resume Next
Set xRng = Application.InputBox("Please select range:", "Kutools for", Selection.Address, , , , , 8)
If xRng Is Nothing Then Exit Sub
On Error Resume Next
For Each xCell In xRng
    With xCell
        .Characters(1, InStr(.Value, Chr(10))).Font.Bold = True
    End With
Next
End Sub

3. Press the "F5" key to run the code. Then a "Kutools for Excel" dialog box pops up, please select the range with the first line you need to make it bold, and then click the "OK" button.

vba code to select the data range

Then you can see all first lines of selected cells are bold immediately as below screenshot shown.

all first lines of selected cells are bold


Bold only the first word in cell using VBA code

As below screenshot shown, sometimes, you need to bold the first word only in range A2:A4 in Excel. You can achieve it as follows step by step.

1. Press "Alt" + "F11" keys simultaneously to open the "Microsoft Visual Basic for Applications" window.

2. In the "Microsoft Visual Basic for Applications" window, click "Insert" > "Module". Then copy and paste the below VBA code into the Module window.

VBA code: Bold only the first word in cells

Sub boldtext()
Dim xRng As Range, xCell As Range
On Error Resume Next
Set xRng = Application.InputBox("Please select range:", "Kutools fro Excel", Selection.Address, , , , , 8)
If xRng Is Nothing Then Exit Sub
On Error Resume Next
For Each xCell In xRng
  If xCell.Value <> "" Then
    xCell.Characters(1, InStr(1, xCell.Value, " ") - 1).Font.Bold = True
  End If
Next
End Sub

3. Press the "F5" key to run the code. In the popping up "Kutools for Excel" dialog box, select the range which you want to make the first word bold, and then press the "OK" button. See screenshot:

vba code to select the data range

Then you can see all first words of selected cells are bold immediately as below screenshot shown.

all first words of selected cells are bold


Bold only the first word or first line in cell using Kutools AI

If you find VBA code too complex, you can use "Kutools AI" for a simpler and more efficient solution. With Kutools for Excel AI, you can automate this task and apply consistent formatting in just a few clicks. Whether you’re working with small datasets or large spreadsheets, "Kutools AI" saves time and ensures a polished result.

Kutools for Excel offers over 300 advanced features to streamline complex tasks, boosting creativity and efficiency. Itegarate with AI capabilities, Kutools automates tasks with precision, making data management effortless. Detailed information of Kutools for Excel...         Free trial...

After installing Kutools For Excel, please click "Kutools" > "AI Aide" to open the "Kutools AI Aide" pane.

  1. Select the data range that you want to remove text within parentheses;
  2. Then, type the requirement in the chat box: such as:
    ● Bold first word of each cell:
    Bold only the first word in the selected range
    ● Bold first line of each cell
    Bold only the first line in each cell within the selected range
  3. And then, press "Enter" key or click the "Send" button. Kutools AI will analyze the question, after finishing, please click "Execute" button to get the result.

Bolding the first line or first word in an Excel cell can significantly enhance the visual appeal and clarity of your data. Choose the approach that best fits your workflow and elevate the presentation of your Excel data! If you're interested in exploring more Excel tips and tricks, our website offers thousands of tutorials.


Related article:


Best Office Productivity Tools

🤖 Kutools AI Aide: Revolutionize data analysis based on: Intelligent Execution   |  Generate Code  |  Create Custom Formulas  |  Analyze Data and Generate Charts  |  Invoke Kutools Functions
Popular Features: Find, Highlight or Identify Duplicates   |  Delete Blank Rows   |  Combine Columns or Cells without Losing Data   |   Round without Formula ...
Super Lookup: Multiple Criteria VLookup    Multiple Value VLookup  |   VLookup Across Multiple Sheets   |   Fuzzy Lookup ....
Advanced Drop-down List: Quickly Create Drop Down List   |  Dependent Drop Down List   |  Multi-select Drop Down List ....
Column Manager: Add a Specific Number of Columns  |  Move Columns  |  Toggle Visibility Status of Hidden Columns  |  Compare Ranges & Columns ...
Featured Features: Grid Focus   |  Design View   |   Big Formula Bar    Workbook & Sheet Manager   |  Resource Library (Auto Text)   |  Date Picker   |  Combine Worksheets   |  Encrypt/Decrypt Cells    Send Emails by List   |  Super Filter   |   Special Filter (filter bold/italic/strikethrough...) ...
Top 15 Toolsets12 Text Tools (Add Text, Remove Characters, ...)   |   50+ Chart Types (Gantt Chart, ...)   |   40+ Practical Formulas (Calculate age based on birthday, ...)   |   19 Insertion Tools (Insert QR Code, Insert Picture from Path, ...)   |   12 Conversion Tools (Numbers to Words, Currency Conversion, ...)   |   7 Merge & Split Tools (Advanced Combine Rows, Split Cells, ...)   |   ... and more
Use Kutools in your preferred language – supports English, Spanish, German, French, Chinese, and 40+ others!

Supercharge Your Excel Skills with Kutools for Excel, and Experience Efficiency Like Never Before. Kutools for Excel Offers Over 300 Advanced Features to Boost Productivity and Save Time.  Click Here to Get The Feature You Need The Most...


Office Tab Brings Tabbed interface to Office, and Make Your Work Much Easier

  • Enable tabbed editing and reading in Word, Excel, PowerPoint, Publisher, Access, Visio and Project.
  • Open and create multiple documents in new tabs of the same window, rather than in new windows.
  • Increases your productivity by 50%, and reduces hundreds of mouse clicks for you every day!