How to Apply Conditional Formatting to Part of a Concatenated Excel Cell
Question details
The user wants to format specific parts of a concatenated text string based on a condition, leaving the rest of the text unformatted.

- Product
- Excel
- Device & OS
- not provided
- Scenario
- Combining multiple values into one cell using a formula (e.g., A1&"~"&B1 to produce '45~62') and needing only one of those specific numbers to change font color if it meets a mathematical condition.
- Observed behavior
- Conditional formatting applies to the entire text string within the cell; it cannot natively isolate and format only a specific part of a cell's contents.
Before proceeding, note that spreadsheet applications process conditional formatting at the cell level, meaning it cannot natively apply different font colors or styles to specific subsets of text within a single formula-generated cell.
Use Separate Cells or Helper Columns for Conditional Formatting
Since you cannot format part of a concatenated cell, the most reliable workaround is to keep your data in distinct cells and format them individually.
By avoiding concatenation and keeping your values in separate columns, you retain the ability to apply distinct mathematical conditions and formatting rules to each individual number.
Instead of using a concatenation formula, keep your first value in cell A1 and your second value in cell C1. If you need a text separator like '~', place it in a narrow column (B1) between them.
Select cell A1, navigate to the 'Home' tab on the top ribbon, click on 'Conditional Formatting', and select 'New Rule'.
Choose 'Use a formula to determine which cells to format'. Enter your condition in the formula box, such as =AND(A1<>0,A1>=40).
Click the 'Format' button, select your desired font color or fill, and click 'OK'. Repeat this process for cell C1 using its respective cell reference.

Convert Formula to Static Text and Use VBA (Advanced)
If you absolutely must have the data in a single cell, you can convert the formula to static text and use a macro to color specific characters. Note that this breaks the dynamic link to the original data.
Manage Complex Data and Formatting Easily with WPS Spreadsheet
While no spreadsheet software can conditionally format part of a concatenated formula cell natively, WPS Spreadsheet offers powerful conditional formatting tools and flexible column management to help you design seamless visual workarounds.
- 1. Open your workbook: Launch WPS Spreadsheet and open your existing Excel file.
- 2. Separate your data: Divide your concatenated values into adjacent columns to prepare them for independent formatting.
- 3. Apply rules: Highlight the separated cells, go to the 'Home' tab, and click 'Conditional Formatting' to apply your specific rules.
- 4. Customize layout: Adjust column widths and remove internal borders to create the visual appearance of a single combined cell.

Frequently Asked Questions
Can I use Rich Text formatting inside an Excel formula?
No. Formulas always return a single unformatted value or string. You cannot apply Rich Text (such as different colors or bold text applied to specific characters) to a cell that contains an active formula.
Why doesn't conditional formatting work on specific words inside a cell?
Conditional formatting rules are designed to evaluate the value of the entire cell as a whole. The software engine does not parse and conditionally format individual characters or words within a single cell's text string.
How do I make multiple cells look like one concatenated cell?
You can place your values in adjacent columns, remove the vertical borders between them, and add an outside border around the entire group of cells. This creates the visual illusion of a single cell while preserving your ability to conditionally format each value independently.




