How to Highlight Pivot Table Months with Conditional Formatting in WPS Office
Question details
The user needs to apply conditional formatting to a pivot table range so cells under month headings are highlighted when the month matches a required month or lead-time value in another column.

- Product
- WPS Office Spreadsheets
- Device & OS
- not provided
- Scenario
- The user has month headings in one row, such as B1:J1, and a reference column, such as M2:M1068, containing required months or lead-time values. They want the matching month cells highlighted automatically.
- Observed behavior
- No matching highlight is applied; conditional formatting must compare each cell with the correct row while keeping the month header fixed.
Open your workbook in WPS Spreadsheets and confirm that the month headings are in one row and the required-month values are in a column. If the reference values are full dates or full month names, create a helper column that normalizes them to the same abbreviated month format used in the headings.
Apply a Mixed-Reference Conditional Formatting Rule to Match Month Headings
Use this solution when the month headings and the required-month column already use the same date or text format.
The formula uses B$1 to keep the comparison fixed on row 1, where the month headings are located, and $M2 to keep the column fixed on the required-month value while allowing the row to change. This makes each cell compare its own column heading with the value in its own row.
Select B2:J1068, or the full range that contains the data. Make sure B2 is the active cell in the selection.
Go to the Home tab, click Conditional Formatting, and select New Rule.
In the New Formatting Rule dialog, select Use a formula to determine which cells to format.
In the formula box, enter =B$1=$M2.
Click Format, choose a fill color or other formatting, and click OK twice to apply the rule.

Normalize Full Dates or Full Month Names Before Comparing
Use this solution when the pivot table headings use abbreviated month names such as Jan, Feb, Mar, but the required-month column contains full dates or full month names.
Highlight Pivot Table Months with WPS Spreadsheets
Use WPS Spreadsheets conditional formatting to compare month headers with required-month values and highlight matches using a simple mixed-reference formula, without writing complex code.
- 1. Open the workbook: Open the file in WPS Spreadsheets and locate the pivot table month headings and required-month column.
- 2. Select the range: Select B2:J1068 and make B2 the active cell inside the selection.
- 3. Create the rule: Go to Home > Conditional Formatting > New Rule > Use a formula to determine which cells to format.
- 4. Enter the formula: Type =B$1=$M2 into the formula box and click Format to choose a highlight.
- 5. Apply and review: Click OK twice, then review the highlighted cells that match the required month or lead-time value.

Frequently Asked Questions
Why does my conditional formatting formula highlight the wrong cells?
Check the mixed references. Use =B$1=$M2 so that B$1 locks the month header row and $M2 locks the required-month column, allowing each row to compare against its own value.
What if the month headings are abbreviated but the reference column contains full dates?
Normalize the reference column first with a helper formula such as =TEXT(M2,"mmm"), then compare the data range against the helper column.
Can I use this rule when the pivot table range changes size?
Yes, but you should select a range that covers the largest possible data area or update the Applies to range after refreshing the pivot table, because the conditional formatting range does not automatically expand.
Does WPS Office support formula-based conditional formatting?
Yes, WPS Spreadsheets supports the same Home > Conditional Formatting > New Rule workflow and formula-based rules, including mixed-reference formulas.
Can I highlight the entire row instead of only the month cell?
Yes, select the full data range you want to format and use a formula anchored to the month header, such as =B$1=$M2. The active cell and Applies to range determine which cells are highlighted.




