Sorry gentlemen but I think my question was a bit unclear, let me detail my
example a little better.
Example:
A1 = Car B1 = 1
A2 = Lorry B2 = 1
A3 = Lorry B3 = 2
A4 = Motorbike B4 = 1
A5 = Motorbike B5 = 2
A6 = Tractor B6 = 1
A7 = Motorbike B7 = 3
A8 = Car B8 = 2
None of the values can be duplicated in col B if there are more than one
value similar in col A. If for example I entered 1 in either B5 or B7 a
warning will appear to tell me that that value has already been used for
that item in col A. Likewise if I entered 2 in B7 and B5 has already the
value 2 a warning will appear.
Hope this explains what I am trying to achieve a little better.
If you are manually entering the values (in Col B) then you could use data
validation to prevent entering a duplicate value.
For example:
Select B1:B8
Data/Validation/Allow Custom:
Formula: =SUMPRODUCT((A1=$A$1:A1)*(B1=$B$1:B1))=1
With the combination of relative and absolute references in the formula, things
should adjust appropriately for each entry.
You can then customize the warning box messages as appropriate. Data
validation would prevent entering a duplicate value.
If you still want to use conditional formatting, then the formula would be:
=SUMPRODUCT((A1=$A$1:A1)*(B1=$B$1:B1))>1
for an illegal entry.
--ron