Formatting Issues

How to Apply Conditional Formatting Based on Multiple Columns in Spreadsheets

Muhammad TalhaMuhammad Talha Nov 11, 2026 868 views

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.

How to Apply Conditional Formatting Based on Multiple Columns
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.
Before you start

Identify the exact data range you wish to format and ensure you know the specific thresholds and conditions required for each column.

Solution 1Recommended

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.

1
Select the target data range

Highlight the range of cells where you want the formatting to appear, for example, $F$5:$F$100.

2
Open Conditional Formatting

Go to the Home tab on the top ribbon, click on 'Conditional Formatting', and select 'New Rule' from the dropdown menu.

3
Choose the formula option

In the New Formatting Rule dialog box, select 'Use a formula to determine which cells to format'.

4
Enter the AND formula

In the formula bar, enter your first condition formula. For example: =AND($C5=99,$F5>4).

5
Set the formatting style

Click the 'Format' button, choose your desired fill color or font style for the highlight, and click 'OK'.

6
Add additional rules

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).

Use the AND Formula for Multi-Column Conditional Formatting
Row Reference Matching: Ensure the row number in your formula exactly matches the first row of your selected 'Applies to' range. If your range starts at F5, your formula must reference row 5.
Advanced Spreadsheet Tool

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. 1. Select your data: Open your document in WPS Spreadsheet and highlight the data range you want to format.
  2. 2. Navigate to Conditional Formatting: Go to the 'Home' tab, click on 'Conditional Formatting', and select 'New Rule'.
  3. 3. Apply your formula: Choose 'Use a formula to format cells', enter your AND formula, customize the display format, and click 'OK'.
Fully compatible with Microsoft Excel formatting rules and formulas.User-friendly interface for managing and prioritizing multiple formatting rules.Free and lightweight software for complex data analysis and visualization.
microsoft office alternative - wps office

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").