Assume that there is a grid like this :-
Code Name Age Salary Overtime
---- ---- --- ------ --------
A1 XXX YYY
When I type in A1 as Code, I will perform a checking whether to allow this person to have any salary entry. If he is not allowed to have any salary entry, the cell "XXX" should be colored as GRAY and it should be blank. And another checking on whether this person is entitled for OVertime, if not entitled, then it wil be filled up with RED color.