Tip: Other languages are Google-Translated. You can visit the English version of this link.
Log in
x
or
x
x
Register
x

or

How to shade a cell based on another cell value in Excel?

Supposing you want to shade a cell (says A1) with a certain background color if cell B4 meets the criteria such as has a certain value or the value is greater or less than a specific number. What would you do? This article will show you the method.

Shade a cell based on another cell value with Conditional Formatting

Office Tab Enable Tabbed Editing and Browsing in Office, and Make Your Work Much Easier...
Kutools for Excel Solves Most of Your Problems, and Increases Your Productivity by 80%
  • Reuse Anything: Add the most used or complex formulas, charts and anything else to your favorites, and quickly reuse them in the future.
  • More than 20 text features: Extract Number from Text String; Extract or Remove Part of Texts; Convert Numbers and Currencies to English Words.
  • Merge Tools: Multiple Workbooks and Sheets into One; Merge Multiple Cells/Rows/Columns Without Losing Data; Merge Duplicate Rows and Sum.
  • Split Tools: Split Data into Multiple Sheets Based on Value; One Workbook to Multiple Excel, PDF or CSV Files; One Column to Multiple Columns.
  • Paste Skipping Hidden/Filtered Rows; Count And Sum by Background Color; Send Personalized Emails to Multiple Recipients in Bulk.
  • Super Filter: Create advanced filter schemes and apply to any sheets; Sort by week, day, frequency and more; Filter by bold, formulas, comment...
  • More than 300 powerful features; Works with Office 2007-2019 and 365; Supports all languages; Easy deploying in your enterprise or organization.

arrow blue right bubble Shade a cell based on another cell value with Conditional Formatting


You can do as follows to shade a cell based on another cell value in Excel.

1. Select the cell (says A1) you want to shade based on another cell value, then click Conditional Formatting > New Rule under Home tab.

2. In the New Formatting Rule dialog box, you need to:

2.1 Select Use a formula to determine which cells to format option in the Select a Rule Type box;

2.2 If you want to shade cell A1 when value of B4 is greater than 500, then enter formula =$B4>500 into the Format values where this formula is true box;

And if you want to shade cell A1 when B4 has a certain value such as “test”, the use this formula =$B4=“test”. You can change the variable in the formula based on your needs.

2.3 Click the Format button to specify a background color;

2.4 Click the OK button when it returns to the New Formatting Rule dialog box. See screenshot:

Then you can see the specified cell is shaded based on the value of another cell as below screenshot shown.


arrow blue right bubbleRelated articles:


Kutools for Excel Solves Most of Your Problems, and Increases Your Productivity by 80%

  • Reuse: Quickly insert complex formulas, charts and anything that you have used before; Encrypt Cells with password; Create Mailing List and send emails...
  • Super Formula Bar (easily edit multiple lines of text and formula); Reading Layout (easily read and edit large numbers of cells); Paste to Filtered Range...
  • Merge Cells/Rows/Columns without losing Data; Split Cells Content; Combine Duplicate Rows/Columns... Prevent Duplicate Cells; Compare Ranges...
  • Select Duplicate or Unique Rows; Select Blank Rows (all cells are empty); Super Find and Fuzzy Find in Many Workbooks; Random Select...
  • Exact Copy Multiple Cells without changing formula reference; Auto Create References to Multiple Sheets; Insert Bullets, Check Boxes and more...
  • Extract Text, Add Text, Remove by Position, Remove Space; Create and Print Paging Subtotals; Convert Between Cells Content and Comments...
  • Super Filter (save and apply filter schemes to other sheets); Advanced Sort by month/week/day, frequency and more; Special Filter by bold, italic...
  • Combine Workbooks and WorkSheets; Merge Tables based on key columns; Split Data into Multiple Sheets; Batch Convert xls, xlsx and PDF...
  • More than 300 powerful features. Supports Office/Excel 2007-2019 and 365. Supports all languages. Easy deploying in your enterprise or organization. Full features 30-day free trial.
kte tab 201905

Office Tab Brings Tabbed interface to Office, and Make Your Work Much Easier

  • Enable tabbed editing and reading in Word, Excel, PowerPoint, Publisher, Access, Visio and Project.
  • Open and create multiple documents in new tabs of the same window, rather than in new windows.
  • Increases your productivity by 50%, and reduces hundreds of mouse clicks for you every day!
officetab bottom
Say something here...
symbols left.
You are guest ( Sign Up? )
or post as a guest, but your post won't be published automatically.
Loading comment... The comment will be refreshed after 00:00.
  • To post as a guest, your comment is unpublished.
    ES Alexander · 3 months ago
    To apply this to multiple rows, use the same formula (Excel automatically continues the formula with relative values).
    e.g. for the following sheet,
    _|_A_B
    1| 0 0
    2| 0 1
    3| 1 0
    4| 1 1
    to make A1 depend on B1, and A2 depend on B2, and so forth, use =$B1=0. To make all the cells in A depend on one cell in B, use =$B$1=0, and to make the cells in A depend on the cells in the next row of B, use =$B2=0 (with the A cells selected from A1).
  • To post as a guest, your comment is unpublished.
    Josh Mckeown · 4 months ago
    Ho do I apply this rule by row
    For example, I want Cell I2 to be formatted by G2. I3 by G3 and so on
    • To post as a guest, your comment is unpublished.
      Aidan · 8 days ago
      Hey for doing it by row, let's say I want to make A red when B > 0.

      For that I would go to A, and enter the formula =B:B > 0

      That's how you would do this
  • To post as a guest, your comment is unpublished.
    Thancos Kakinada · 6 months ago
    How can we apply the rule on multiple cells with a single formula? Applying the rule on every single cell will be a hectic job.
  • To post as a guest, your comment is unpublished.
    Deb · 10 months ago
    How might i format column N to be shaded according to value in column L? (Eg higher red, lower blue, equals green, no value - no shading)
    Can i write a formula for column N in conditional formatting?

    K L M N
    DD 0.2 0.8

    AM 0.8 1.0

    TB 1.0 1.0

    AM 1.0 1.0

    TB 0.6 0.8

    AM 0.4 0.4

    AM 0.8 0.8


    Any help appreciated
    D
    • To post as a guest, your comment is unpublished.
      crystal · 9 months ago
      Hi Deb,
      Sorry can't help you with that. Thank you for your comment.
      • To post as a guest, your comment is unpublished.
        Aidan · 8 days ago
        Hey Deb and Crystal,

        For doing it by row, let's say I want to make A red when B > 0.

        For that I would go to A, and enter the formula =B:B > 0

        That's how you would do this
  • To post as a guest, your comment is unpublished.
    Manish · 1 years ago
    i want to know formula for color change of cell on basis of two different cell values
    • To post as a guest, your comment is unpublished.
      crystal · 1 years ago
      Hi Manish,
      Please try this formula =AND($A2="KTE", $B2>100)