Okay, now that we know the premise of the numbers, my first piece of advice
is to enter all your data as text, and not as numbers formatted as text.
In my sample data, I set up cells B1:J1000 as random 3 digit numbers
(entered as text). Since I can use conditional formatting for up to 3
conditions, I wanted those 3 conditions to match up in cells A1, A2, and A3
(those are the cells I type in that will determine what gets highlighted.
I then selected the entire range from B1:J1000 (with B1 as my active cell),
and did the following as conditional formats.
Condition 1:
=OR(B1=$A$1,B1=LEFT($A$1,1)&RIGHT($A$1,1)&MID($A$1,2,1),B1=RIGHT($A$1,1)&LEFT($A$1,2),B1=RIGHT($A$1,1)&MID($A$1,2,1)&LEFT($A$1,1),B1=MID($A$1,2,1)&LEFT($A$1,1)&RIGHT($A$1,1),B1=MID($A$1,2,1)&RIGHT($A$1,1)&LEFT($A$1,1))
Condition 2:
=OR(B1=$A$2,B1=LEFT($A$2,1)&RIGHT($A$2,1)&MID($A$2,2,1),B1=RIGHT($A$2,1)&LEFT($A$2,2),B1=RIGHT($A$2,1)&MID($A$2,2,1)&LEFT($A$2,1),B1=MID($A$2,2,1)&LEFT($A$2,1)&RIGHT($A$2,1),B1=MID($A$2,2,1)&RIGHT($A$2,1)&LEFT($A$2,1))
Condition 3:
=OR(B1=$A$3,B1=LEFT($A$3,1)&RIGHT($A$3,1)&MID($A$3,2,1),B1=RIGHT($A$3,1)&LEFT($A$3,2),B1=RIGHT($A$3,1)&MID($A$3,2,1)&LEFT($A$3,1),B1=MID($A$3,2,1)&LEFT($A$3,1)&RIGHT($A$3,1),B1=MID($A$3,2,1)&RIGHT($A$3,1)&LEFT($A$3,1))
Note: There is an add-in that can supposedly handle up to 30 conditional
formats located at:
http://www.xldynamic.com/source/xld.CFPlus.Download.html
But I find it buggy, and has a tendency to re-format the cells with numbers
back to general (and thus removing preceding 0s). You may wanna see if you
can get it to work better than I could.
In addition, there is a snippet of VBA code that may give you some ideas on
how to work better with VBA and conditional formatting. That link is listed
below. I did not try that VBA code at all (didn't really look at it), but you
may want to see if you could do anything with it. Anyway, I hope this helps
at least some.
http://www.microsoft.com/office/com...d136&mid=595c9b00-015c-424a-86c5-7fc51d289191