How to Apply Conditional Formatting Based on Multiple Columns in Spreadsheets
Question details
The user wants to highlight cells in a specific column when conditions are met in both that column and another corresponding column simultaneously.

- Product
- Spreadsheet
- Device & OS
- not provided
- Scenario
- Setting up advanced conditional formatting rules that evaluate data across multiple columns using custom formulas.
- Observed behavior
- Cells in column F need to be highlighted only if their value exceeds a threshold and the corresponding row in column C matches a specific criteria.
Identify the exact data range you wish to format and ensure you know the specific thresholds and conditions required for each column.
Use the AND Formula for Multi-Column Conditional Formatting
Create a custom rule using the AND function to check conditions across multiple columns at the same time.
Using a formula in conditional formatting allows you to apply complex logic that standard presets cannot handle. By utilizing the AND function, a cell is highlighted only when all the specified conditions are met.
It is crucial to use mixed cell references (like $C5). The dollar sign locks the column so the rule always checks column C, while the relative row number allows the rule to evaluate each row individually down the selected range.
Highlight the range of cells where you want the formatting to appear, for example, $F$5:$F$100.
Go to the Home tab on the top ribbon, click on 'Conditional Formatting', and select 'New Rule' from the dropdown menu.
In the New Formatting Rule dialog box, select 'Use a formula to determine which cells to format'.
In the formula bar, enter your first condition formula. For example: =AND($C5=99,$F5>4).
Click the 'Format' button, choose your desired fill color or font style for the highlight, and click 'OK'.
If you have different thresholds for different criteria, repeat the process to create another new rule with the second formula, such as: =AND($C5=17,$F5>10).

Easily Apply Complex Conditional Formatting in WPS Spreadsheet
WPS Spreadsheet provides an intuitive interface for managing conditional formatting rules. It fully supports custom formulas, allowing you to highlight important data based on multiple custom criteria with ease.
- 1. Select your data: Open your document in WPS Spreadsheet and highlight the data range you want to format.
- 2. Navigate to Conditional Formatting: Go to the 'Home' tab, click on 'Conditional Formatting', and select 'New Rule'.
- 3. Apply your formula: Choose 'Use a formula to format cells', enter your AND formula, customize the display format, and click 'OK'.

Frequently Asked Questions
Why is my conditional formatting applying to the wrong rows?
This typically occurs if the row number in your custom formula does not match the first row of your selected range. For instance, if you highlight the range F5:F100, your formula must start evaluating at row 5 (e.g., $C5).
What does the dollar sign ($) do in the conditional formatting formula?
The dollar sign creates an absolute reference. Using $C5 locks the formula to column C so it doesn't shift when evaluating the rule, while leaving the row number relative so it adjusts dynamically for each row in the selected range.
Can I add more than two conditions in the AND formula?
Yes, the AND function can evaluate multiple conditions simultaneously. You can add more logical tests by separating them with commas, for example: =AND($C5=99, $F5>4, $G5="Yes").




