Smart Systems for Home

Plain how-to guides for smart home, security and home Wi-Fi

How to Bold in Concatenate Excel

· 6 min read · Home Tech

In this article
  1. What You'll Need
  2. Step-by-Step
  3. Common Mistakes
  4. Tips
  5. Troubleshooting
  6. Frequently Asked Questions

When you combine text from multiple cells with the CONCATENATE function (or the & operator), the result is a single text string with uniform formatting. Excel does not let you format part of a formula result directly. To make only part of the combined text bold, you need to use a different approach: either use a formula that returns a rich text value (only possible with VBA or the new TEXTJOIN combined with formatting in a cell), or manually copy the result and format it. The real solution: use a VBA macro or manually format after copying. This guide shows you the VBA method, which is the only way to get true partial bold in a cell that updates automatically.

What You'll Need

  • Microsoft Excel for Windows or Mac (the macro works on both, but ribbon paths differ slightly).
  • A workbook where you want to combine text from two or more cells, with one part bold.
  • Basic comfort with the Visual Basic for Applications (VBA) editor. You will copy and paste a small macro.
  • Note: This method requires saving your file as a macro-enabled workbook (.xlsm) if you want to reuse it later.

Step-by-Step

  1. Set up your data. For example, put "Product:" in cell A1 and "Widget" in cell B1. You want cell C1 to display "Product: Widget" with "Product:" in bold.
  2. Open the VBA editor. Press Alt+F11 on Windows (or Fn+Option+F11 on Mac). This opens the Visual Basic for Applications window.
  3. Insert a new module. In the VBA editor, go to Insert > Module. A blank code window appears.
  4. Paste the macro. Copy the following code and paste it into the module window:
    Sub BoldConcatenate()
        ' Combines text from A1 and B1, bolding the first part
        Dim rngTarget As Range
        Dim strFirst As String
        Dim strSecond As String
        
        ' Set the target cell (change as needed)
        Set rngTarget = Range("C1")
        
        ' Read the source values
        strFirst = Range("A1").Value
        strSecond = Range("B1").Value
        
        ' Clear any existing content
        rngTarget.Clear
        
        ' Write the combined text with the first part bold
        rngTarget.Value = strFirst & " " & strSecond
        rngTarget.Characters(1, Len(strFirst)).Font.Bold = True
    End Sub
    Note: This macro assumes your data is in A1 and B1, and the result goes to C1. Adjust the range references to match your layout.
  5. Run the macro. Press F5 while the cursor is inside the macro, or go to Run > Run Sub/UserForm. The result appears in C1 with the first part bold.
  6. Make it automatic (optional). To have the formatting update whenever you change A1 or B1, you can add a worksheet event. In the VBA editor, double-click the sheet name (e.g., "Sheet1") in the Project Explorer, then paste this code:
    Private Sub Worksheet_Change(ByVal Target As Range)
        ' If the changed cell is A1 or B1, update C1
        If Not Intersect(Target, Range("A1:B1")) Is Nothing Then
            Call BoldConcatenate
        End If
    End Sub
    Now, whenever you change A1 or B1, C1 updates automatically with bold formatting.
  7. Save as macro-enabled workbook. Go to File > Save As, choose "Excel Macro-Enabled Workbook (*.xlsm)" from the file type dropdown, and save. This preserves the macro.

Common Mistakes

  • Using CONCATENATE or & and expecting partial bold. These functions return plain text; you cannot format part of the result.
  • Forgetting to clear the target cell before writing. If the target cell already has content, the macro might overwrite it, but if you use .Value it replaces everything, so it's fine. However, if you use .Characters on a cell that previously had longer text, leftover characters can remain. Always clear first.
  • Using the wrong range in the macro. If your data is in different cells, the macro will still reference A1 and B1. Always adjust the range references.
  • Not saving as .xlsm. If you save as .xlsx, the macro is lost, and the next time you open the file, the formatting won't work.
  • Running the macro on a protected sheet. If the sheet is protected, the macro may fail. Unprotect the sheet or include code to unprotect it temporarily.

Tips

  • Use the & operator for simple concatenation if you don't need formatting: =A1 & " " & B1 works fine.
  • For multiple bold parts, you can extend the macro by adding more .Characters lines. For example, to bold the second part as well, add: rngTarget.Characters(Len(strFirst)+2, Len(strSecond)).Font.Bold = True (the +2 accounts for the space).
  • If you only need bold for a one-time report, you can copy the concatenated result and paste as values, then manually bold the part you want. That's quicker for a single use.
  • Use a helper column to store the concatenated text, then use a macro to format that cell. This keeps your original data intact.
  • On Mac, the VBA editor opens with Fn+Option+F11, and the ribbon paths are similar but with slight differences (e.g., "Insert" is under "Developer" tab if you have it enabled).

Troubleshooting

  • Macro does nothing. Check that you have entered the code correctly, and that the target cell reference matches where you want the result. Also ensure that the VBA editor is not in break mode (press Ctrl+G to open Immediate window and type BoldConcatenate to run it directly).
  • Error "Sub or Function not defined". This means the macro name is misspelled or the module is not properly inserted. Re-check the code.
  • The bold formatting disappears when you edit the cell. If you manually edit the cell after the macro runs, Excel recalculates and may lose the formatting because the cell contains a static value, not a formula. To keep it, re-run the macro after editing.
  • Macro works but the text is not bold. Ensure that the Characters start position and length are correct. For example, if your first string is "Product:" (8 characters), the code uses Characters(1, 8). If the string has leading/trailing spaces, adjust accordingly.
  • Worksheet_Change event doesn't fire. Make sure the code is in the correct sheet module, not a standard module. Also, ensure macros are enabled (File > Options > Trust Center > Trust Center Settings > Macro Settings > Enable all macros).

Frequently Asked Questions

  1. Can I use a formula to bold part of a concatenated string? No, standard Excel formulas return plain text. Only VBA can apply formatting to specific characters within a cell value.
  2. Does TEXTJOIN allow bold formatting? No, TEXTJOIN combines text but does not preserve or apply formatting. You would still need VBA.
  3. Is there a way to do this without macros? Yes, manually: concatenate with a formula, copy the result, paste as values, then select the part you want bold and press Ctrl+B. This works for static results.
  4. Can I bold the second part instead of the first? Yes, adjust the Characters line in the macro. For example, to bold the text from position 10 to the end, use rngTarget.Characters(10, Len(rngTarget.Value)-9).Font.Bold = True.
  5. Will this work in Excel for the web? No, VBA is not supported in Excel for the web. You would need to use the desktop version.
  6. Can I use conditional formatting to bold part of a concatenated string? No, conditional formatting applies to entire cells, not partial text.