Usage of Data Validation with If Condition

  • Thread starter Mujeeb ur Rehman, FBL-GRW-PK
  • Start date
M

Mujeeb ur Rehman, FBL-GRW-PK

I am using Data validation in a sheet, that is working well as per my
requirement.

Now I want to use this with IF Condition.

Mean if a cell has some particular value then Data Validation should work
otherwise it shows blank value on the same column where I have applied data
validation (LIST)
 
A

Ashish Mathur

Hi,

Assume that when there is "try" (without double quotes) in cell C6, then a
validation list should appear in cell D6. Elsewhere on the worksheet, enter
the validation list entries, say in C12:C15. Select C12:C15 and assign it a
name, try (the entry in cell C6). Now in cell D6, go to Data > Validation >
List and enter =indirect(C6) > OK

The validation list entries would appear in cell D6 only when there is try
in cell C6, else the validation drop down will show blanks.

Hope this helps.

--
Regards,

Ashish Mathur
Microsoft Excel MVP
www.ashishmathur.com

"Mujeeb ur Rehman, FBL-GRW-PK"
 
M

Mujeeb ur Rehman, FBL-GRW-PK

Upon your suggession I did the same. One think could not be understand. That
there is no usage of the NAME of the range (C12:C15) which we have assigned.
WHY?
 
A

Ashish Mathur

Hi,

There is. The entry in cell C6 I.e. try is used to name the contents of
range C12:C15. By doing so, indirect(C6) becomes indirect(try) and try in
turn holds the data in range C12:C15

--
Regards,

Ashish Mathur
Microsoft Excel MVP
www.ashishmathur.com

"Mujeeb ur Rehman, FBL-GRW-PK"
 

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

Top