conditional format last value

ajith

Board Regular
Joined
Nov 21, 2012
Messages
215
Office Version
  1. 2016
Platform
  1. Windows
Hello,
How to highlight the last cell in column of similar values in column having different sets of values
[TABLE="class: grid, width: 500, align: center"]
<tbody>[TR]
[TD][/TD]
[TD]A[/TD]
[TD]B[/TD]
[TD]C[/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD][/TD]
[TD]apple[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]2[/TD]
[TD][/TD]
[TD]apple[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]3[/TD]
[TD][/TD]
[TD]orange[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]4[/TD]
[TD][/TD]
[TD]lemon[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]5[/TD]
[TD][/TD]
[TD]lemon[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]6[/TD]
[TD][/TD]
[TD]lemon[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]7[/TD]
[TD][/TD]
[TD]apple[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]8[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]

So we have to highlight B3,B6 and B7.

Thanks
 
Last edited:

Excel Facts

Excel motto
Not everything I do at work revolves around Excel. Only the fun parts.
try this with CF > formula

=COUNTIF($B$1:B1,B1)=COUNTIF($B:$B,B1)
 
Upvote 0
Hello AlanY,
Yes it works but it highlights the empty cell,B8 also.
 
Upvote 0
try this

=AND(LEN(B1)>0,COUNTIF($B$1:B1,B1)=COUNTIF($B:$B,B1))
 
Last edited:
Upvote 0
Hello AlanY,
Great! it works.
But I forgot to tell that I had already applied "=MOD(ROW(),2)=1" for highlighting alternate rows. So in these rows the formatting is not working. I tried to move up/stop if true options the new rule, but still the same. What to do?

Sorry to trouble you.
 
Upvote 0
keep the =MOD(ROW(),2)=1 rule in second and don't check out the stop if true, would that work for you?
 
Upvote 0
Sorry. It is working. There was an error in my formula when i typed it. Thanks a lot
 
Upvote 0

Forum statistics

Threads
1,223,908
Messages
6,175,305
Members
452,633
Latest member
DougMo

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