Conditional Formatting

karla12

New Member
Joined
Sep 5, 2018
Messages
7
I need to highlight in different colors the different formats listed below in a single column.
123RMW
1234RMD
TA12345RM
1234RM
I have used "if contains D", "if contains W", and if Contains TA" for the first three (all in different colors).
I can't figure out how to highlight the last one. It doesn't have anything unique enough to use. Maybe something like "if the string is 6 characters long AND if the first four characters are numbers" But I can't figure out how to write that.

Thanks for the help.
****** id="cke_pastebin" style="position: absolute; top: 0px; width: 1px; height: 1px; overflow: hidden; left: -1000px;">[FONT=&quot]Conditional Formatting[/FONT]
Karla[FONT=&quot] [/FONT][FONT=&quot]· an hour ago[/FONT][FONT=&quot][/FONT][FONT=&quot]First of all great course. Learning so much.
I need a formula for a conditional formatting on a column of cells to highlight those with the format of 4 numbers and then 2 letters, i.e. 1234AB. Here are the formats of the data in that column.
123ABW
1234ABD
TA123-12345AB
1234AB
I need different colors for each type of entry. I have "if contains a W", "If Contains a D", If Contains a TA". But, I can't figure out one for the last one. Nothing is unique enough.
[/FONT]

</body>
 

Excel Facts

Pivot Table Drill Down
Double-click any number in a pivot table to create a new report showing all detail rows that make up that number
if having 6 characters and ending in RM is unique enough then do

this assumes your data is in column A... change the $A to whatever column you need.. do not remove the $ sign

=AND(LEN($A1)=6,RIGHT($A1,2)="RM")
 
Upvote 0
if you want to avoid the strings that are also 6 characters but have letters in them like G123RM (this would still be ok with the above formula) then try this one out

=AND(LEN($A1)=6,ISNUMBER(NUMBERVALUE(LEFT($A1,4))),RIGHT($A1,2)="RM")
 
Upvote 0

Forum statistics

Threads
1,215,833
Messages
6,127,157
Members
449,367
Latest member
w88mp

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