Forum Home
Press F1
 
Thread ID: 103432 2009-09-23 04:00:00 Excel formula bpt2 (6653) Press F1
Post ID Timestamp Content User
812978 2009-09-24 13:46:00 Thanks for your interest and help.

No worries. But for me to try and give you more help I realised that I may be trying to go beyond my level of expertise in Excel.

At least we now have defined (to a point) what the problem is.

I didn't have much of a chance today but I will have more time between Fri and Sun this week.

It is an interesting problem and gives me something to do. Better than watching TV anyway.

:thanks
Sweep (90)
812979 2009-09-24 22:31:00 You could try something like this for your data validation on cells D5 and E5:

=IF(OR(ISBLANK($D$5), ISBLANK($E$5)), TRUE, OR(AND($E$5=0,$D$5=2), AND($E$5=1,$D$5=2), AND($E$5=2,$D$5=0), AND($E$5=2,$D$5=1)))

What this does is test to see if either of the cells is blank and if so it wont try and validate. However, if both numbers have a value then it does the test using the logic you put in your original post - which worked fine btw except for the extra bracket at the end.

So this logic will only accept the following combinations: 2-0, 2-1, 1-2 and 0-2 or where one of the two values is not given (i.e. an empty cell).

HTH
Dave
odyssey (4613)
1 2