How do I restrict data entry to one of two columns

  • Thread starter Thread starter Gillian
  • Start date Start date
G

Gillian

I have a file with several fields to be entered. Two of the columns are date
fields (say columns E and F). What I want to happen is that if data is
entered in row 3 of column E then it is not possible to enter data in row 3
of column F, and vice versa.
I presume this would be some kind of conditional formatting, but I can't
work out how to do this. I also need to do this in Excel 2000.
 
I'd use a formula in G3:

=IF(COUNTA(E3:F3)<2,"0k","Only one value!")

or maybe something like:

=IF(COUNTA(E3:F3)=0,"Please enter a value in E or F (not both)",
IF(COUNTA(E3:F3)=1,"0k","Only one value!"))
 
Data Validation.
In cell E1, go to Data-->Validation
Allow:
Date
Data:
Greater than or equal to
Start Date:
=IF(F1>0,99999,0)
Highlight column E (or at least down to where is needed), and go to
Data-->Validation, and select YES for extending data validation.

Then in F1, do the same thing as in E, except the formula for start date
will be E1, highlight column F, and go to Data-->Validation, YES to extend,
again, same as you did in column E.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top