a conditional validation so that so that when C2 = A1, B1,C1,D1 then the
value of D2 must be greater than 0 but less than or equal to 8 otherwise the
value is 0

this is what I have.

=IF(D2=or(A1,B1,C1,D1), ,0) this is a validation formula
written in D2

How do I write is greater than 0 but less than or equal to 8 in the true
portion of the formula