How to Create a Color Scale with Conditional Formatting Based on Another Cell

Dataset Overview

Suppose you have a dataset with daily wages and sales data. You want to format the wages column using a color scale based on the sales value. Here’s how you can do it:

Conditional Formatting Color Scale Based on Another Cell in Excel


Step 1 – Define the Conditions

  • Select the Wages Column:
    • Highlight the cells in the Wages/Day column where you want to apply the color scale.
  • Access Conditional Formatting:
    • Go to the Home tab in the Excel ribbon.
    • Click on Conditional Formatting and choose Color Scales.
    • Then select More Rules.

Conditional Formatting Color Scale Based on Another Cell in Excel


Step 2 – Set Up Formulas and Colors for Different Conditions

We’ll create three rules corresponding to different sales value ranges:

  • Red for Sales < 5:
    • In the New Formatting Rule window, choose Use a formula to determine which cells to format.
    • Enter this formula in the rule box:
= E5 < 5
    • Click Format.

Conditional Formatting Color Scale Based on Another Cell in Excel

    • Go to the Fill tab and select the Red as Background Color.
    • Press OK.

Insert Formulas and Apply Colors for Different Conditions

    • The wage cell has become red if sales/day is less than 5.

Insert Formulas and Apply Colors for Different Conditions

 

  • Yellow for Sales Between 5 and 10:
    • Create a similar rule:
    • Enter this formula into the rule description box
=AND(E5 >= 5, E5 <= 10)
    • Format with yellow background.

Insert Formulas and Apply Colors for Different Conditions

    • The cells of wages become yellow of which sales/day is between 5 and 10.

Insert Formulas and Apply Colors for Different Conditions

  • Green for Sales > 10:
    • Again, create a rule:
    • Enter this formula in the box:
= E5 > 10
    • Format with green background.

Insert Formulas and Apply Colors for Different Conditions

    • The cells of wage/day of rows where sales/day is greater than 10 become green.

Insert Formulas and Apply Colors for Different Conditions

Read More: Conditional Formatting with 3 Color Scale in Excel Formula


Step 3 – Organize the Rules

To ensure the rules are applied in the correct order:

  • Go to the Home tab.
  • Click on Conditional Formatting and select Manage Rules.

Make Serial of the Conditions

  • In the Stop If True column, check all the boxes.

Make Serial of the Conditions

  • Arrange the rules:
    • Drag the rule for Sales < 5 to the top.
    • Place the rule for Sales between 5 and 10 next.
    • The rule for Sales > 10 will be automatically positioned last.

Conditional Formatting Color Scale Based on Another Cell in Excel

  • Now, when you change the values in the Sales column, the color of the wage cells will adjust accordingly.

Conditional Formatting Color Scale Based on Another Cell in Excel

Read More: Color Scale Per Row with Conditional Formatting in Excel


Things to Remember

  • Directly applying color scale formatting based on another cell isn’t possible in Excel.
  • You need to create individual rules for each condition to achieve the desired color scale effect.

Download Practice Workbook

You can download the practice workbook from here:


Related Articles

<< Go Back to Conditional Formatting | Learn Excel

Get FREE Advanced Excel Exercises with Solutions!
Osman Goni Ridwan
Osman Goni Ridwan

OSMAN GONI RIDWAN is a marine engineer who loves exploring Excel and VBA programming. Programming, to him, is a time-saving tool for efficiently managing data, files, and internet tasks. He is proficient in Rhino3D, Maxsurf, C++, MS Office, AutoCAD, Excel, and VBA and goes beyond the basics. Armed with a B.Sc in Naval Architecture & Marine Engineering from BUET, OSMAN has transitioned into the role of a content developer. Specializing in creating technical content exclusively centered around Excel... Read Full Bio

We will be happy to hear your thoughts

Leave a reply

Advanced Excel Exercises with Solutions PDF

 

 

ExcelDemy
Logo