Formatting based on multiple criteria

nmgmarques

Board Regular
Joined
Mar 1, 2011
Messages
129
Hi all:

Consider:
<b></b><table cellpadding="2.5px" rules="all" style=";background-color: #FFFFFF;border: 1px solid;border-collapse: collapse; border-color: #BBB"><colgroup><col width="25px" style="background-color: #DAE7F5" /><col /><col /><col /><col /><col /><col /><col /><col /></colgroup><thead><tr style=" background-color: #DAE7F5;text-align: center;color: #161120"><th></th><th>A</th><th>B</th><th>C</th><th>D</th><th>E</th><th>F</th><th>G</th><th>H</th></tr></thead><tbody><tr ><td style="color: #161120;text-align: center;">1</td><td style="font-weight: bold;border-left: 1px solid black;color: #FFFFFF;background-color: #4F81BD;;">Nº Interno</td><td style="font-weight: bold;color: #FFFFFF;background-color: #4F81BD;;">Ano</td><td style="font-weight: bold;color: #FFFFFF;background-color: #4F81BD;;">ECM</td><td style="font-weight: bold;color: #FFFFFF;background-color: #4F81BD;;">Aplicável</td><td style="font-weight: bold;color: #FFFFFF;background-color: #4F81BD;;">Assunto</td><td style="font-weight: bold;color: #FFFFFF;background-color: #4F81BD;;">Responsável</td><td style="font-weight: bold;color: #FFFFFF;background-color: #4F81BD;;">Data</td><td style="font-weight: bold;border-right: 1px solid black;color: #FFFFFF;background-color: #4F81BD;;">Conclusão</td></tr><tr ><td style="color: #161120;text-align: center;">2</td><td style="text-align: right;;">1</td><td style="text-align: right;;">2016</td><td style="background-color: #92D050;;">500000011599</td><td style=";"></td><td style=";">Specification 784_0048</td><td style=";">Test User</td><td style="text-align: right;;">2016.02.10</td><td style="text-align: right;;">2016.02.17</td></tr><tr ><td style="color: #161120;text-align: center;">3</td><td style="text-align: right;;">2</td><td style="text-align: right;;">2016</td><td style="background-color: #92D050;;">500000011234</td><td style=";"></td><td style=";">Specification 123_54687</td><td style=";">Test User</td><td style="text-align: right;;">2016.03.10</td><td style="text-align: right;;">2016.03.17</td></tr><tr ><td style="color: #161120;text-align: center;">4</td><td style="text-align: right;background-color: #FF0000;;">3</td><td style="text-align: right;background-color: #FF0000;;">2016</td><td style="background-color: #FF0000;;">500000011599</td><td style=";"></td><td style=";">Specification 784_0048</td><td style=";">Test User</td><td style="text-align: right;;">2016.03.11</td><td style="text-align: right;;">2016.03.18</td></tr><tr ><td style="color: #161120;text-align: center;">5</td><td style="text-align: right;;">1</td><td style="text-align: right;;">2016</td><td style="background-color: #FF0000;;">500000011599</td><td style=";"></td><td style=";">Specification 784_0048</td><td style=";">Test User</td><td style="text-align: right;;">2016.03.12</td><td style="text-align: right;;">2016.03.19</td></tr><tr ><td style="color: #161120;text-align: center;">6</td><td style="text-align: right;;">1</td><td style="text-align: right;;">2016</td><td style="background-color: #92D050;;">500000011599</td><td style=";">A</td><td style=";">Specification 784_0048</td><td style=";">Test User</td><td style="text-align: right;;">2016.03.13</td><td style="text-align: right;;">2016.05.11</td></tr><tr ><td style="color: #161120;text-align: center;">7</td><td style="text-align: right;;">2</td><td style="text-align: right;;">2016</td><td style="background-color: #92D050;;">500000011234</td><td style=";">NA</td><td style=";">Specification 123_54687</td><td style=";">Test User</td><td style="text-align: right;;">2016.03.13</td><td style=";">-</td></tr></tbody></table><p style="width:3em;font-weight:bold;margin:0;padding:0.2em 0.6em 0.2em 0.5em;border: 1px solid #BBB;border-top:none;text-align: center;background-color: #DAE7F5;color: #161120">Index</p><br /><br />

This table is updated automatically from another workbook. Whenever a new copy of the other workbook is created, it pushes data to this one, filling in the columns.

When a ECM is created, nothing is highlighted. My issue is when duplicates start to arise. I need to format them based on the case.

  • If the ECM exists and data in columns A through E are identical, the C cell should highlight red. This indicates a duplicate entry. Rows 2 and 5.
  • If the ECM exists and data in columns C through E are identical and A and B differ, cells A,B and C should highlight red. This indicates someone tried to create a new number for an existing ECM. Rows 2 and 4.
  • If the ECM exists and data in columns A through E (with the exception of D) are identical, the C cell should highlight green. This indicates the ECM has been either approved or rejected. Rows 2 and 6; 3 and 7.


The very first occurrence of the ECM number will always be either no fill (in case there is no other mention of the ECM in C) or green. Only the 2nd and following references should trigger the formatting above.

Is this at all possible? I don't believe conditional formatting will cover this.
 

Some videos you may like

Excel Facts

Best way to learn Power Query?
Read M is for (Data) Monkey book by Ken Puls and Miguel Escobar. It is the complete guide to Power Query.

Watch MrExcel Video

Forum statistics

Threads
1,122,193
Messages
5,594,774
Members
413,934
Latest member
austinb

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Top