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

2823 questions
539
votes
7 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. …
296
votes
6 answers

How to highlight cell if value duplicate in same column for google spreadsheet?

I am looking for formula for google spreadsheet highlight cell if value duplicate in same column can anyone please assist me for this query?
user3331309
  • 2,977
  • 2
  • 12
  • 4
114
votes
7 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
  • 6,240
  • 9
  • 47
  • 92
86
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,225
  • 7
  • 30
  • 44
65
votes
6 answers

Conditional Formatting from another sheet

I'm trying to have a cell on Sheet A check if it's either > or < the value in a cell on Sheet B, then change its color accordingly. Under the custom formula I use: =A1>("SheetB!A1"), but it doesn't seem to work. I use the color Green for the > and…
Josh
  • 767
  • 2
  • 6
  • 11
42
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
  • 449
  • 1
  • 4
  • 5
31
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),…
DanZimmerman
  • 1,626
  • 6
  • 23
  • 45
27
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
  • 998
  • 2
  • 10
  • 25
26
votes
17 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
  • 403
  • 1
  • 4
  • 7
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
  • 12,766
  • 47
  • 165
  • 315
20
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
  • 3,272
  • 3
  • 24
  • 39
20
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
  • 241
  • 1
  • 2
  • 7
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,230
  • 5
  • 34
  • 62
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,514
  • 17
  • 54
  • 81
15
votes
2 answers

Conditional Formatting using Excel VBA code

I have Range object called DestinationRange which references range B3:H63 I want to apply the following two conditional formatting rules using Excel VBA code dynamically (the range can change): If Cell column D is blank, no formatting should be…
TechGeek
  • 2,172
  • 15
  • 42
  • 69
1
2 3
99 100