Highlight entire row if last string has even number at the end of text, using excel function or vba.

Astronaut01

New Member
Joined
Jan 26, 2022
Messages
18
Office Version
  1. 2016
Platform
  1. Windows
Hi experts, basically i have dynamic entries in col A, eg.. hrr-101, hrr-102. I need to highlight entire row if theres an entry ending with even number, by just using excel formula. If not, vba is ok. Thanks for your answers.
 

Excel Facts

Quick Sum
Select a range of cells. The total appears in bottom right of Excel screen. Right-click total to add Max, Min, Count, Average.
Hi
select your entire range ( not only col A) and use the following as Conditional Formatting formula
Excel Formula:
=MOD(RIGHT($A1,LEN($A1)-FIND("-",$A1))+0,2)=0
Format as required
 
Upvote 0
Hi
select your entire range ( not only col A) and use the following as Conditional Formatting formula
Excel Formula:
=MOD(RIGHT($A1,LEN($A1)-FIND("-",$A1))+0,2)=0
Format as required
Hi arthurbr
It is working now. However, how can i make the formula to highlight the entire rows by just depending on the last digit as odd or even? Like a dynamic entries in col A? Thank you again for the answer on this one.
 
Upvote 0
To just use the last digit you can use
Excel Formula:
=MOD(RIGHT($A1)+0,2)=0
 
Upvote 0
Or just use the ISEVEN function, i.e.
Excel Formula:
=ISEVEN(RIGHT($A1,1))
 
Upvote 0
Solution

Forum statistics

Threads
1,215,744
Messages
6,126,618
Members
449,322
Latest member
Ricardo Souza

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