Conditional formatting certain digit

MatHo

New Member
Joined
Sep 20, 2017
Messages
3
Hi!
I have a sheet filled with 9-digit figures (ex. 172234512)
There is a need to sort out every figure with the status of the 5:th digit.
What is the most easy way to solve that?

For example: if the 5:th digit is 3 (like above) then mark the cell red. If the 5:th digit is 2 (172224512) mark it green...

Thanks!
 

Excel Facts

Excel Wisdom
Using a mouse in Excel is the work equivalent of wearing a lanyard when you first get to college
Hi, welcome to the forum. You could use the "With a formula" method with conditional formatting. For your first example the formula would be something like:

=MID(A1,5,1)="3"
 
Upvote 0
You can do that with conditional formatting. Lets say A1 holds your number. Use this conditional formatting formula:

=MID(A1,5,1)="3"

Repeat for 2.
 
Upvote 0
I got a problem with the formula, but it was solved by changing the =MID(A1,5,1)="3" to =MID(A1;5;1)="3"
Thank you for the support!
 
Upvote 0

Forum statistics

Threads
1,224,822
Messages
6,181,165
Members
453,021
Latest member
Justyna P

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