Validate if a number occurs more than once

Sep 1, 2011 at 11:17 AM

I have a cross-reference table in which the user can enter numbers. But no numbers can appear more than once. So I wonder how I do to control this?
I want that if the user write a number that alrady exist, the application automatic replace the existing number with the number that were before in changed cell

example:

Before
1 2 3
4 5 6
7 8 9

User change to
1 2 3
8 5 6
7 8 9

The application automatic change to
1 2 3
8 5 6
4 9


I'm trying to use OnEditEnded, but that are never executed.