Formatting Issues

How to Format Column B Based on Column A Values in WPS Spreadsheets

Jason MillerJason Miller Nov 13, 2026 870 views

Question details

The user wants to apply conditional formatting so cells in column B are filled red when the corresponding value in column A is negative and green when it is positive.

How to Format Column B Based on Column A Values in WPS Spreadsheets
Product
WPS Spreadsheets
Device & OS
not provided
Scenario
Conditional formatting across two columns, with column B's fill driven by the value in column A.
Observed behavior
Column B cells should display red for negative column A values and green for positive column A values.
Before you start

Open the workbook in WPS Spreadsheets and identify the exact range in column B to format. Check which row is the active cell in the selection so the formula reference uses the correct starting row.

Solution 1Recommended

Create Formula-Based Conditional Formatting Rules for Column B

Use this method when you need the cell fill in column B to change dynamically according to the sign of the matching value in column A.

This approach uses a fixed column reference and a relative row reference, so each cell in column B is compared with the cell in the same row of column A.

1
Select the target cells in column B

In WPS Spreadsheets, select the column B range to format, such as B1:B100, making sure B1 is the active cell. If your selection starts at B2, adjust the formula row reference to 2.

2
Open a new conditional formatting rule

Go to the Home tab, click Conditional Formatting, and choose New Rule.

3
Create the red fill rule for negative values

Select "Use a formula to determine which cells to format," enter =$A1<0, click Format, choose a red fill on the Fill tab, and confirm.

4
Create the green fill rule for positive values

With the same range still selected, open Conditional Formatting > New Rule again, enter =$A1>0, choose a green fill, and confirm.

Create Formula-Based Conditional Formatting Rules for Column B
Rules applied to column B: The formatting updates automatically when column A values change, as long as the formula row reference matches the selected range.
WPS Spreadsheets conditional formatting

Apply Cross-Column Conditional Formatting in WPS Spreadsheets

Use WPS Spreadsheets to apply Excel-style formula rules that fill column B red or green based on negative or positive values in column A. The familiar conditional formatting workflow keeps your .xlsx workbook compatible and easy to share.

  1. 1. Open your workbook: Launch WPS Spreadsheets and open the Excel or WPS workbook containing columns A and B.
  2. 2. Select the column B range: Click and drag to select the cells in column B you want to format, ensuring the active cell is the first row in the selection.
  3. 3. Create the two formula rules: On the Home tab, go to Conditional Formatting > New Rule, use =$A1<0 with a red fill, then create a second rule with =$A1>0 and a green fill.
  4. 4. Confirm and save: Click OK to apply both rules, review the colors, and save the file as .xlsx to maintain Microsoft Excel compatibility.
Formula-based rules fill column B according to column A valuesFull compatibility with Microsoft Excel .xlsx workbooksFree, lightweight spreadsheet editingFamiliar ribbon interface and conditional formatting workflow
microsoft office alternative - wps office

Frequently Asked Questions

Why does my conditional formatting rule not color column B correctly?

Check that the formula uses a relative row reference such as =$A1 and that the active cell in the selected range is the same row as the formula reference. If the selection starts at B2, use =$A2 instead.

Can I apply this rule to the entire column B?

Yes. Select the entire column B or a large range such as B1:B1000, keep B1 as the active cell, and use =$A1 in both rules. Blank cells in column A normally remain unfilled.

How do I manage or remove these conditional formatting rules?

Go to Home > Conditional Formatting > Manage Rules, select the worksheet range, and edit or delete the red and green rules.

Will the formatting update if column A values change?

Yes. Formula-based conditional formatting rules recalculate automatically, so column B cell colors change when the corresponding column A value changes.

Can I use different colors or conditions?

Yes. In the rule dialog, choose a different fill color or adjust the formula, for example =$A1=0 to target zero values.