Share via

IF/THEN function in Data Validation

Anonymous
2019-06-24T06:38:54+00:00

I am trying to create a custom data validation whereby a drop down list only becomes enabled if a date/text is entered into a previous cell. 

Any help will be appreciated. 

TIA

Microsoft 365 and Office | Excel | For home | Windows

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments

Answer accepted by question author

Anonymous
2019-06-24T08:30:31+00:00

Hi Josh,

Good news! There is no need to use Macros.

I have tested use formula to achieve our goal and it works. For example:

I input formula into data validation of Cell B1: =If(A1<>"",$B$2:$B$6,$B$1) 

Then you can add data validation for A1 as date only so that if there is no date value in A1, B1 show nothing.

Regards,

Eric

Was this answer helpful?

0 comments No comments

3 additional answers

Sort by: Most helpful
  1. Anonymous
    2019-06-24T08:53:50+00:00

    Amazing - so simple. 

    Thank you.

    Was this answer helpful?

    0 comments No comments
  2. Anonymous
    2019-06-24T08:06:40+00:00

    Thank you for your email.

    I'm looking at the second option you gave but it doesn't seem to be

    working, please could you assist.

    What I want to achieve is that if a cell doesn't have a date entered the

    next cell with a drop down to be disabled.

    Many thanks

    Was this answer helpful?

    0 comments No comments
  3. Anonymous
    2019-06-24T07:12:02+00:00

    Hi Josh,

    I have two idea.

    1. Dependent drop-down list

    By this way, you will have two drop down list (you can create third if needed), the second list can't be viewed unless you have selected an option in the first one. I know you want to enable a list based on value in a cell not another list, but this method is simple and efficent.

    1. Lock a cell based on value of another cell

    Honestly, Macros is more complex but useful, you can lock the cell with the list based on the value of any cell and there will be more condition you can apply on the list like (more than/less than).

    If anyone has other solutions, welcome to share here.

    Regards,

    Eric

    Was this answer helpful?

    0 comments No comments