Try this (youll need to test this with a lot of results)
=IF(AND(A1=C1,B1=D1),15,IF(AND(C1<>D1,OR(AND(A1=C1,B1<>D1),AND(B1=D1,A1<>C1))),10,IF(OR(AND(A1>B1,C1>D1,A1<>C1),AND(B1>A1,D1>C1,B1<>D1),AND(A1=B1,C1=D1,A1<>C1)),5,0)))
I have a feeling this could be shortened as subsequent IFs may be already be implied by the failure of previous IFs, ie we may be checking for things we dont need to as a previous If would have been true but all I've done is simply check against your examples.
Bookmarks