Conditional Formatting help

Ian1976

Board Regular
Joined
Feb 4, 2016
Messages
139
Office Version
  1. 365
Platform
  1. Windows
Hi,

I have a table with several columns and rows, is there a method to highlight the cell at the botom of the column in red if there are more than 2 data entries in that column?

Thanks

[TABLE="class: grid, width: 500, align: center"]
<tbody>[TR]
[TD]A
[/TD]
[TD]B
[/TD]
[TD]C
[/TD]
[TD]D
[/TD]
[TD]E
[/TD]
[TD]F
[/TD]
[TD]J
[/TD]
[TD]H
[/TD]
[TD]I
[/TD]
[/TR]
[TR]
[TD]X
[/TD]
[TD]X
[/TD]
[TD]X
[/TD]
[TD]X
[/TD]
[TD]X
[/TD]
[TD]X
[/TD]
[TD]X
[/TD]
[TD]X
[/TD]
[TD]X
[/TD]
[/TR]
[TR]
[TD]X
[/TD]
[TD]X
[/TD]
[TD]X
[/TD]
[TD][/TD]
[TD]X
[/TD]
[TD][/TD]
[TD][/TD]
[TD]X
[/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD]X
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]X
[/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD]RED
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]RED
[/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
 

Excel Facts

Control Word Wrap
Press Alt+Enter to move to a new row in a cell. Lets you control where the words wrap.
Hi
Here's the function I've prepared for you. I assume that your header row is 1 and the data toto count starts from row to. So, select the whole table you have, go to the conditional formatting and place below formula and set the colouring. Let me know if that's ok for you.

Code:
=And(A3<>"";COUNTIF(A$2:A$1000;A2)>2)
[\CODE]
 
Upvote 0
You might be better off placing the colour at the TOP of the column instead of bottom, otherwise you're gonna have to scroll to the lowest row in order to see the colour.
 
Upvote 0
Hi,
One more thing. For below function select range for conditional formattinf from 2nd row on (without headers) to have it worked properly.
Code:
=And(A3<>"";COUNTIF(A$2:A$1000;A2)>2)
 
Upvote 0
Hi
Here's the function I've prepared for you. I assume that your header row is 1 and the data toto count starts from row to. So, select the whole table you have, go to the conditional formatting and place below formula and set the colouring. Let me know if that's ok for you.

Code:
=And(A3<>"";COUNTIF(A$2:A$1000;A2)>2)
[\CODE][/QUOTE]

Thanks Mentor82,

I've put the code in and its working but it highlights cells c2,c3 & c4 but i would like it if it just highlighted the bottom cell i.e C7?

Is that possible? Oh and i used "X" as an example but the cell could contain any text or number?

Thanks
Ian
 
Last edited:
Upvote 0

Forum statistics

Threads
1,223,958
Messages
6,175,636
Members
452,662
Latest member
Aman1997

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
Back
Top