=AND(A6 said:
would you care to explain the formula used?
The formula first checks to see if a supplier name has been entered in A6:
A6<>""
If A6 is an empty cell then you can't enter an invoice number in B6.
This portion checks to make sure the *combination* of the supplier name and
the invoice number are unique therefore, no duplicates:
SUMPRODUCT(--(A$2:A6&"^^"&B$2:B6=A6&"^^"&B6))<2
It concatenates the supplier name and the invoice number together separated
by the characters ^^. It would look something like this:
Supplier1^^0001
Let's assume A2:B2 holds:
Supplier1...0001
If you try to enter in A6:B6 Supplier1 and 0001 then:
SUMPRODUCT(--(A$2:A6&"^^"&B$2:B6=A6&"^^"&B6))<2
Would evaluate to FALSE and would not allow you to enter that invoice number
in B6.