How to Display Multiple Status Codes in One Excel Cell
Question details
The user needs to display multiple employee infraction codes or statuses recorded on the same date within a single Excel cell.
- Product
- Excel
- Device & OS
- not provided
- Scenario
- Tracking employee infractions or statuses where multiple events occur on the same date.
- Observed behavior
- The user wants a way to combine multiple codes into one cell and represent them visually, but a single Excel cell natively only supports one background fill color.
Ensure your data is organized in a structured table format with clear columns for employee names, dates, and infraction types. Note that a single Excel cell can only contain one background fill color natively.
Combine Multiple Codes Using TEXTJOIN and FILTER Formulas
Use this advanced formula combination to dynamically filter employee data by date and join multiple applicable status letters into a single cell.
Since a single Excel cell can only hold one background fill color, the best approach is to use text characters (like 'A' or 'P') to represent statuses. The TEXTJOIN function, combined with FILTER and INDEX, allows you to merge these characters dynamically based on employee names and dates.
Click on the cell where you want the combined infraction codes to appear for a specific employee and date.
Type a formula utilizing TEXTJOIN, FILTER, and INDEX. For example: =TEXTJOIN(",",TRUE,IF(INDEX(FILTER(A2:D6,(A2:A6="Employee 1")*(B2:B6=DATE(2024,1,3)),""),,3)=1,"A",""),IF(INDEX(FILTER(A2:D6,(A2:A6="Employee 1")*(B2:B6=DATE(2024,1,3)),""),,4)=1,"P",""))
Press Enter to calculate the formula. This will display a comma-separated list of the relevant status codes (e.g., 'A,P') for that specific employee on that date.
Use Conditional Formatting for Combined Text Codes
Assign specific background colors to cells containing combined text codes to create a visual representation of multiple statuses.
Use WPS Spreadsheet for Advanced Formula Tracking
WPS Office provides powerful spreadsheet capabilities, including advanced functions like TEXTJOIN and dynamic array formulas, to help you track employee infractions and statuses seamlessly.
- 1. Open your tracker: Launch WPS Spreadsheet and open your employee tracker workbook.
- 2. Apply the TEXTJOIN formula: Enter the TEXTJOIN and FILTER combination into your designated status column to combine the infraction codes.
- 3. Color-code the results: Go to the Home tab and use the Conditional Formatting tool to assign unique background colors to specific text combinations.

Frequently Asked Questions
Can I have two different background fill colors in one Excel cell?
No, a single Excel cell natively supports only one background fill color at a time. If you need to represent multiple statuses, it is best to combine them into text (like 'A, B') and apply a single unique color to that specific combination using Conditional Formatting.
What does the TEXTJOIN function do in this formula?
The TEXTJOIN function combines text from multiple ranges or strings and includes a delimiter you specify (such as a comma) between each text value. In this tracker, it effectively merges multiple infraction letters into one readable cell while ignoring empty values.
Why is the FILTER function necessary for this employee tracker?
The FILTER function extracts only the rows of data that meet your specific criteria, such as matching a particular employee's name and a specific date. This ensures that only the relevant daily infractions for that specific person are joined together.




