top of page

You are learning Conditional Formatting in MS Excel

Can I use conditional formatting to format cells based on another cell's value?

Absolutely! Conditional formatting is a powerful tool in Excel that allows you to format cells based on various conditions, including the value of another cell. Here's how you can achieve this:

1. Select the cells you want to format: Choose the range of cells that will be affected by the conditional formatting rule.

2. Go to Conditional Formatting: Navigate to the "Home" tab on the Excel ribbon. In the "Styles" group, click the dropdown arrow next to "Conditional Formatting."

3. New Rule: A menu with various formatting options will appear. Select "New Rule" to create a new conditional formatting rule.

4. "Format values where this formula is true": In the "New Formatting Rule" window, choose the option "Format values where this formula is true."

5. Enter your formula: In the text box below "Format values where this formula is true," enter a formula that compares the cell you want to format with the reference of the cell containing the value you want to base the formatting on. Here are some examples:

- Format cells equal to another cell: `=A1="TargetValue"` (Replace "TargetValue" with the actual value)
- Format cells greater than another cell: `=A1>B1` (Cell A1 is formatted if its value is greater than the value in B1)
- Format cells containing text: `=ISTEXT(A1)` (Formats cells in A1 that contain text)

Tips:
- You can use cell references (e.g., B2, C5) or even absolute references ($B$2) in your formula.
- Logical operators like ">", "<", "=", "<>" (not equal), "AND", and "OR" can be used to create complex conditions.

6. Set your formatting: Click the "Format" button to choose the formatting style you want to apply when the condition is met. You can change font color, fill color, borders, and more.

7. Click OK: After defining your formula and formatting preferences, click "OK" to apply the conditional formatting rule.

Now, the cells you selected will be formatted based on the value in the referenced cell and the condition you specified in your formula. As the values in the referenced cell change, the formatting will update automatically.

bottom of page