conditional format last value

ajith

Board Regular
Joined
Nov 21, 2012
Messages
214
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
ABC
1apple
2apple
3orange
4lemon
5lemon
6lemon
7apple
8

<tbody>
</tbody>

So we have to highlight B3,B6 and B7.

Thanks
 
Last edited:

Excel Facts

Spell Check in Excel
Press F7 to start spell check in Excel. Be careful, by default, Excel does not check Capitalized Werds (whoops)

AlanY

Well-known Member
Joined
Oct 30, 2014
Messages
4,342
Office Version
  1. 365
  2. 2019
  3. 2016
Platform
  1. Windows
try this with CF > formula

=COUNTIF($B$1:B1,B1)=COUNTIF($B:$B,B1)
 

ajith

Board Regular
Joined
Nov 21, 2012
Messages
214
Office Version
  1. 2016
Platform
  1. Windows
Hello AlanY,
Yes it works but it highlights the empty cell,B8 also.
 

AlanY

Well-known Member
Joined
Oct 30, 2014
Messages
4,342
Office Version
  1. 365
  2. 2019
  3. 2016
Platform
  1. Windows
try this

=AND(LEN(B1)>0,COUNTIF($B$1:B1,B1)=COUNTIF($B:$B,B1))
 
Last edited:

ajith

Board Regular
Joined
Nov 21, 2012
Messages
214
Office Version
  1. 2016
Platform
  1. Windows

ADVERTISEMENT

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.
 

AlanY

Well-known Member
Joined
Oct 30, 2014
Messages
4,342
Office Version
  1. 365
  2. 2019
  3. 2016
Platform
  1. Windows
keep the =MOD(ROW(),2)=1 rule in second and don't check out the stop if true, would that work for you?
 

ajith

Board Regular
Joined
Nov 21, 2012
Messages
214
Office Version
  1. 2016
Platform
  1. Windows

ADVERTISEMENT

I had tried that also. Not working
 

ajith

Board Regular
Joined
Nov 21, 2012
Messages
214
Office Version
  1. 2016
Platform
  1. Windows
Sorry. It is working. There was an error in my formula when i typed it. Thanks a lot
 
Master Excel Bundle

Excel contains over 450 functions, with more added every year. That’s a huge number, so where should you start? Right here with this bundle.

Forum statistics

Threads
1,163,487
Messages
5,831,978
Members
430,099
Latest member
rdhoy

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