Hi Lesley ,
Why do you need code for this ?
Select the 2 cells F1 and F2 , and click on Data Validation , Custom , and enter the formula :
=OR(AND(ISBLANK(F$1),NOT(ISBLANK(F$2))),AND(ISBLANK(F$2),NOT(ISBLANK(F$1))))
This will prevent the user from entering data into both F1 and F2.
Either both F1 and F2 can be left blank , or data can be entered into either F1 or F2. Data cannot be entered into both F1 and F2.
However , the user can copy paste data into both cells overriding the data validation. If you want to prevent this , then you need to use code.
Narayan