Formatting Issues

How to Retain Cell Formatting When Combining Text in Excel

Khadija KhanKhadija Khan Nov 11, 2026 869 views

Question details

The user wants to preserve specific cell formatting (such as partial italics) when combining text from multiple cells into a single destination cell.

How to Retain Cell Formatting When Combining Text in Excel
Product
Excel
Device & OS
not provided
Scenario
Attempting to concatenate text from multiple source cells using built-in formulas like CONCAT or TEXTJOIN.
Observed behavior
Native Excel formulas return plain text, stripping away any mixed formatting such as bold or italics applied to specific characters within the source cells.
Before you start

Since standard spreadsheet functions cannot return richly formatted text, prepare to use Visual Basic for Applications (VBA) to solve this issue. Ensure you have saved a backup of your workbook in a macro-enabled format (.xlsm) before running custom scripts.

Solution 1Recommended

Combine Cells and Retain Formatting via VBA

A VBA macro allows you to combine text strings and systematically apply the exact character formatting from the source cells to the new combined cell.

Because Excel functions evaluate values rather than formats, you cannot use CONCAT or TEXTJOIN to keep partial formatting. VBA solves this limitation by reading the text, pasting the combined string into the destination, and then mapping the formatting character-by-character using the Characters object.

1
Open the VBA Editor

Press Alt + F11 on your keyboard to open the Visual Basic for Applications Editor.

2
Insert a New Module

Click 'Insert' in the top menu and select 'Module' to create a blank workspace for your code.

3
Input the Concatenation Script

Paste a custom VBA script designed to loop through your target cells, combine their text values, and copy the .Characters.Font properties from the source to the destination cell.

4
Run the Macro

Close the VBA editor, return to your sheet, and press Alt + F8. Select your new macro from the list and click 'Run'.

Combine Cells and Retain Formatting via VBA
Macro-Enabled Workbook Required: To save your VBA script for future use, you must save your file as an Excel Macro-Enabled Workbook (.xlsm).
Efficient Data Management

Manage Advanced Formatting with WPS Spreadsheet

WPS Spreadsheet offers robust support for VBA macros, allowing you to easily run custom scripts that combine text while preserving rich formatting like italics and bold text. It is highly compatible with macro-enabled files and provides a smooth interface for complex data tasks.

  1. 1. Open Your Data in WPS Office: Launch WPS Spreadsheet and open the file containing the text you wish to combine.
  2. 2. Access Developer Tools: Navigate to the 'Developer' tab on the top ribbon.
  3. 3. Launch the VBA Editor: Click 'Visual Basic Editor' to input your advanced text combination and formatting script.
  4. 4. Execute the Code: Run the macro to instantly combine your chosen cells while perfectly preserving any specific character formatting.
Fully compatible with Microsoft Excel (.xlsx and .xlsm) formatsBuilt-in Developer tools and VBA macro supportLightweight application that runs smoothly on all devicesFamiliar user interface ensures a zero learning curve
microsoft office alternative - wps office

Frequently Asked Questions

Why do formulas like CONCAT and TEXTJOIN lose my italic formatting?

Excel functions are designed to extract and calculate only the underlying raw data (values) from cells. They do not extract or process the metadata associated with rich text formatting, such as bold, italics, or font colors.

Can I use conditional formatting to apply italics to part of a cell's text?

No, conditional formatting applies rules to the entire cell. To format only specific characters within a single cell, you must apply the formatting manually from the Home tab or utilize a VBA macro.

Is there a native feature to merge cells and keep the text from all cells?

When you use the native 'Merge Cells' button in Excel or WPS, it only keeps the value of the upper-left cell and discards the rest. To combine the text of all cells, you must use concatenation formulas or macros.