Function Problems

WPS Spreadsheet: Flag Repeated Values in Column A Based on Column B

Jason MillerJason Miller Nov 12, 2026 869 views

Question details

The user needs to flag or highlight values in column A when the corresponding value occurs more than once in column B.

WPS Spreadsheet: Flag Repeated Values in Column A Based on Column B
Product
WPS Spreadsheet
Device & OS
not provided
Scenario
A worksheet contains related values in columns A and B, and repeated entries in column B need to identify the corresponding rows in column A.
Observed behavior
The worksheet does not yet automatically identify rows whose corresponding column B value appears more than once.
Before you start

Confirm which rows contain data and whether row 1 is a header. Select the exact range in column A that should be highlighted, such as A2:A100, before creating the conditional formatting rule.

Solution 1Recommended

Use conditional formatting with COUNTIF to highlight matching values in column A

Use this solution when you want WPS Spreadsheet to automatically highlight column A whenever its corresponding value appears more than once in column B.

The COUNTIF function counts how many times the value in each row of column B appears in the entire column. Applying the rule to column A makes the corresponding value in column A stand out without changing the worksheet data.

1
Select the target cells

In WPS Spreadsheet, select the range in column A to format, such as A2:A100.

2
Open conditional formatting

Go to the Home tab, select Conditional Formatting, and choose New Rule or a formula-based rule option.

3
Enter the duplicate-check formula

Choose Use a formula to determine which cells to format, then enter =AND($B2<>"",COUNTIF($B:$B,$B2)>1). The blank check prevents empty cells from being highlighted.

4
Choose a highlight style

Click Format, select a fill color or font style, and click OK to apply the rule.

5
Verify the results

Check the rows in column A whose corresponding values in column B occur more than once. Edit a value in column B to confirm that the highlight updates automatically.

Formula for a whole-column check: If blank cells are not an issue, you can use =COUNTIF($B:$B,$B2)>1. For a limited data range, replace $B:$B with a range such as $B$2:$B$100.
WPS Spreadsheet solution

Identify repeated column values with WPS Spreadsheet

WPS Spreadsheet lets you combine COUNTIF formulas with conditional formatting to flag the corresponding values in another column. The result updates as your data changes and can be saved in common Excel-compatible formats.

  1. 1. Open the spreadsheet: Launch WPS Office, open your workbook in WPS Spreadsheet, and select the data range.
  2. 2. Create the rule: Use Home > Conditional Formatting > New Rule and enter =AND($B2<>"",COUNTIF($B:$B,$B2)>1).
  3. 3. Format the matches: Choose a fill or font style, then click OK to highlight the corresponding values in column A.
  4. 4. Save the workbook: Use File > Save As and select XLSX if you need to share the spreadsheet with Microsoft Excel users.
Automatically highlights related values when column B contains duplicatesSupports COUNTIF, COUNTIFS, IF, and formula-based conditional formattingKeeps the worksheet easy to review without manually checking repeated entriesCompatible with Microsoft Excel XLSX spreadsheets for smooth sharing and migration
microsoft office alternative - wps office

Frequently Asked Questions

What formula highlights column A when the corresponding value in column B is duplicated?

Select the target range in column A and use =AND($B2<>"",COUNTIF($B:$B,$B2)>1) in a conditional formatting rule. The $B2 reference checks the value in column B for each row.

Can I use COUNTIFS instead of COUNTIF in WPS Spreadsheet?

Yes. For example, =COUNTIFS($B:$B,$B2)>1 produces the same duplicate check and can be extended with additional criteria if needed.

How do I avoid highlighting blank cells?

Include the condition $B2<>"" in the rule: =AND($B2<>"",COUNTIF($B:$B,$B2)>1). This ensures that empty cells are ignored.

Can I flag duplicates with text instead of color?

Yes. In a helper column, enter =IF(AND(B2<>"",COUNTIF($B:$B,B2)>1),"Repeated","") and fill the formula down the rows.

Will the conditional formatting update when column B changes?

Yes. Because the rule uses a COUNTIF reference to column B, WPS Spreadsheet recalculates the count and updates the highlight when values are edited.