How to Match a Cell Color to the Worksheet Tab with the Lowest Value in WPS Office Spreadsheets
Question details
The user wants to identify the worksheet that contains the lowest value and automatically fill the result cell with that worksheet tab's color, including tie handling when multiple sheets share the minimum.
- Product
- WPS Office Spreadsheets
- Device & OS
- not provided
- Scenario
- The workbook has multiple source worksheets with colored tabs and a comparison sheet that must show which sheet has the lowest value by using the matching tab color.
- Observed behavior
- The goal state is a result cell that adopts the corresponding worksheet tab color after recalculation, with a clear way to indicate ties or multiple matching sheets.
Open the workbook in WPS Office Spreadsheets and identify the source sheets and their current tab colors. If any tab color can change, save a macro-enabled copy and confirm that macros are trusted before using the VBA approach.
Use conditional formatting with fixed worksheet tab colors
Best when the worksheet tab colors are fixed and you prefer a formula-based, no-macro solution.
A standard spreadsheet formula cannot read a worksheet tab color, so you must create separate conditional formatting rules for each source sheet. Each rule compares the source value to the minimum and applies the intended fill color.
Select the cell that should display the matching color, then click Home > Conditional Formatting > New Rule.
Choose Use a formula to determine which cells to format and enter a comparison formula such as =B1=MIN(Co1!B1,Co2!B1,Co3!B1,Co4!B1), replacing the references with your sheet names and cells.
Click Format, open the Fill tab, select the color that matches the source worksheet tab, and confirm with OK.
Create one rule per source sheet using that sheet's value reference and its matching tab color. Open Manage Rules from Home > Conditional Formatting to review or reorder the rules.
If multiple sheets can tie for the lowest value, add distinct tie rules with another fill or pattern, or use an adjacent cell with an IF formula that lists all matching worksheet names instead of relying only on color.
Use VBA to read the actual worksheet tab color when tab colors change
Use this macro-based method when worksheet tab colors may change and the result cell must sync with the current tab color.
Apply the lowest-value worksheet tab color with WPS Spreadsheets conditional formatting
You can complete this task directly in WPS Office Spreadsheets without a separate Excel add-in. Use conditional formatting rules linked to the minimum value, or use a macro-enabled workbook to read the current worksheet tab color, so the result cell updates clearly even when ties occur.
- 1. Open the workbook: Launch WPS Office and open the workbook that contains the comparison sheet and colored source tabs.
- 2. Apply conditional formatting: Select the result cell and click Home > Conditional Formatting > New Rule to create a formula-based rule.
- 3. Set the matching fill colors: In the Format Cells dialog, set the fill color for each rule to the corresponding worksheet tab color and confirm with OK.
- 4. Add tie handling: Create additional rules for possible ties or use an adjacent cell formula to list all matching worksheet names.
- 5. Test the result: Change source values and confirm that the result cell updates to the correct tab color and that tie cases are visible.

Frequently Asked Questions
Can a normal spreadsheet formula read a worksheet tab color?
No. Standard formulas cannot read tab colors in WPS Office Spreadsheets or Excel. Use fixed conditional formatting rules, or use VBA with the Tab.Color property in a macro-enabled workbook.
How do I handle multiple worksheets that have the same lowest value?
Create separate conditional formatting rules for each tie combination with distinct fills or patterns, or display the matching sheet names in an adjacent cell with an IF or LET formula. Text labels are clearer than color alone.
Does WPS Spreadsheets support VBA to match a cell to a changing tab color?
In macro-enabled editions, you can use VBA to read the worksheet Tab.Color property and apply it to the result cell. Save the workbook as a macro-enabled file and run the code only when macros are trusted.
What should I do if I do not want to use macros?
Use conditional formatting with one rule per source sheet and assign the fill color manually. This works well when worksheet tab colors are fixed; if tab colors change, the fill colors will not update automatically.




