Questions tagged [conditional-formatting]

Conditional formatting is a technique, where cells of a table are formatted depending on cells evaluated value or other conditions. Use with relavant products, which support such formatting like [excel]/[vba], [google-sheets]/[google-apps-script], [pandas]. If your question is not about programmatic access to Conditional formatting, consider asking it on superuser.com where you can get general help with Conditional formatting.

Conditional formatting is a technique, where cells of a table are formatted depending on cells evaluated value or other conditions. Such techniques are available with , , and other database or spreadsheet related software.

Cells can be configured to show different formatting, such as colours or symbols according to pre configured conditions like the value of the cell, a specific date/time or value of adjacent cells. For example, negative values could have a red fill colour for the cell.

Questions tagged with should be about setting up or/and configuring conditional formatting programmatically either via , , , , , , or any 3rd party libraries which support conditional formatting.

Please note if your question is about general help with setting up or configuring conditional formatting it's probably off-topic for Stack Overflow and you'd be better off asking your question on another Stack Exchange site like SuperUser.com.

2087 questions
513
votes
6 answers

Conditional formatting based on another cell's value

I'm using Google Sheets for a daily dashboard. What I need is to change the background color of cell B5 based on the value of another cell - C5. If C5 is greater than 80% then the background color is green but if it's below, it will be amber/red. …
84
votes
6 answers

Conditional formatting, entire row based

I've searched and read through answers related to conditional formatting, but I can't seem to get mine to work, so maybe I'm doing something wrong. I have a worksheet for work. It contains a list of animals in our shelter. What I'm attempting to do…
Josh
  • 3,053
  • 6
  • 26
  • 43
82
votes
6 answers

Vue.js: Conditional class style binding

I have some data that is accessible via: {{ content['term_goes_here'] }} ... and this evaluated to either true or false. I'd like to add a class depending on the truthiness of the expression like so:
Jeremy Thomas
  • 4,902
  • 7
  • 33
  • 73
37
votes
3 answers

Change the color of cells in one column when they don't match cells in another column

I want to check if the values in one column are the same as values in another column. Whenever the values are not the same, I would like to change the color of these cells. For example: Column I, Column AA both have the value of a the first month…
user3381987
  • 399
  • 1
  • 3
  • 5
24
votes
16 answers

Excel - Conditional Formatting - insert row

Using Offset or Indirect in 'Applies To' does not seem to work. Is there any other way to stop conditional formatting from breaking after inserting row/s I have a conditional format for a range for e.g. $O$19:$O$105. The condition is 'if cell value…
ssp
  • 251
  • 1
  • 2
  • 6
22
votes
2 answers

Using conditional formatting to highlight a row if the date in the column F equals todays date

How would I get a row in my table to highlight if the date in the column F equals todays date. Note that more than one row can be lit up at once.
methuselah
  • 11,066
  • 40
  • 134
  • 242
19
votes
5 answers

Conditional Formatting - Color Scale entire row based on one column

Suppose I want to color scale complete rows on the basis of values in a column (using excel inbuilt color scale option in the conditional formatting menu). How do I achieve this? Please see the following image
Gaurav Singhal
  • 850
  • 2
  • 7
  • 22
19
votes
6 answers

How to highlight a cell using the hex color value within the cell?

I have a spreadsheet of symbols and matching hex colors. I want to fill the cell itself (or the one next to it) with the hex color within the cell. I've read a bit about "conditional formatting", and I think that's the way to do it. How might I…
knowbody
  • 231
  • 1
  • 2
  • 7
17
votes
3 answers

Conditional Formatting by Expression using EPPlus

I'm trying to format some range by using conditional Formatting feature of EPPlus. I read many document but there is nowhere mentions about Conditional Formatting Expression. I'm very confusing. Don't know how to use that feature. Here are my some…
Han
  • 2,988
  • 3
  • 21
  • 36
16
votes
6 answers

Conditionally formatting cells if their value equals any value of another column

I have data in the A and B columns. B column's data is mostly duplicates of A's data, but not always. For example: A Budapest Prague Paris Bukarest Moscow Rome New York B Budapest Prague Los Angeles Bukarest I need to search the A column for the…
PeterInvincible
  • 2,050
  • 5
  • 29
  • 59
15
votes
6 answers

Conditional Formatting (IF not empty)

How do I conditionally format a cell so if not blank it is grey? I tried to do 'not equal', but it didn't work. I am using Windows Office 2003 with Windows XP at work. I don't see the same feature as below: What I have tried so far: Edit:…
George
  • 4,094
  • 16
  • 46
  • 77
15
votes
2 answers

Conditional Formatting using Excel VBA code

I have Range object called DistinationRange which contains reference to range B3:H63 I want to apply the following two conditional formatting rules using Excel VBA code dynamically. (Because the range would not be same all the time) If Cell column…
Tejas
  • 2,052
  • 13
  • 40
  • 67
14
votes
7 answers

Conditional formatting using AND() function

I'm trying conditional formatting on a sheet. I need to fill the cells with a certain color according to the following conditional…
some user
  • 337
  • 1
  • 5
  • 16
14
votes
2 answers

Conditionally format Python pandas cell

I am trying to color, highlight, or change fond of Python pandas DataFrame based on the value of the cell. e.g. if the cells on each rows are bigger than the cell in the first column of that row, then highlight the cell as red (or any other color),…
thatMeow
  • 898
  • 4
  • 15
  • 39
14
votes
1 answer

Excel Conditional Formatting based on Other Column

I have two columns in Excel as shown on the picture below. I need to apply conditional formatting in this way: if row in B column contain "1", the cell A on the same row should change its color. This needs to be applied only for the cell in A…
DNac
  • 2,031
  • 6
  • 24
  • 49
1
2 3
99 100