ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   List if criteria are met (https://www.excelbanter.com/excel-discussion-misc-queries/127020-list-if-criteria-met.html)

Franko

List if criteria are met
 
can anyone help....

I want to use data validation to allow a drop down list in a cell but only
if certain criteria are met.

e.g. If A1="yes" then show yes in the validation cell, if b1="no" then show
no, if not then shown the dropdown list for yes/no

At the moment i have the validation in cell d1 as a list with this formula:
=IF(OR(A1="",B1=""),YESNO,IF(A1="YES","YES",IF(B1= "NO","NO",YESNO))))

With the name of my list being yesno

thanks for any help

Bob Phillips

List if criteria are met
 
This formula, with a Data Validation type of List is not quite what you
asked, but will only allow Yes if A1 is Yes, No if B1 is No, or else gives a
list of what is in G1:G2

=IF(A1="Yes","Yes",IF(B1="No","No",G1:G2))

pre-load G1:G2 with Yes, No

--
HTH

Bob Phillips

(there's no email, no snail mail, but somewhere should be gmail in my addy)

"franko" wrote in message
...
can anyone help....

I want to use data validation to allow a drop down list in a cell but only
if certain criteria are met.

e.g. If A1="yes" then show yes in the validation cell, if b1="no" then

show
no, if not then shown the dropdown list for yes/no

At the moment i have the validation in cell d1 as a list with this

formula:
=IF(OR(A1="",B1=""),YESNO,IF(A1="YES","YES",IF(B1= "NO","NO",YESNO))))

With the name of my list being yesno

thanks for any help




Debra Dalgleish

List if criteria are met
 
In your YESNO range, select the Yes cell, and name it YES, and select
the No cell, and name it NO.

In the Data Validation formula, refer to these ranges:

=IF(A1="Yes",YES,IF(B1="No",NO,YESNO))

franko wrote:
can anyone help....

I want to use data validation to allow a drop down list in a cell but only
if certain criteria are met.

e.g. If A1="yes" then show yes in the validation cell, if b1="no" then show
no, if not then shown the dropdown list for yes/no

At the moment i have the validation in cell d1 as a list with this formula:
=IF(OR(A1="",B1=""),YESNO,IF(A1="YES","YES",IF(B1= "NO","NO",YESNO))))

With the name of my list being yesno

thanks for any help



--
Debra Dalgleish
Contextures
http://www.contextures.com/tiptech.html


Franko

List if criteria are met
 
Looks like both you and Bob are saying the same thing.

This solution does work because it will not allow users to enter an invalid
answer. But i am guessing that there is no way of having the "yes" to fill
in all the other cells if my criteria are met??

If not.... no worries and thanks to you both.


"Debra Dalgleish" wrote:

In your YESNO range, select the Yes cell, and name it YES, and select
the No cell, and name it NO.

In the Data Validation formula, refer to these ranges:

=IF(A1="Yes",YES,IF(B1="No",NO,YESNO))

franko wrote:
can anyone help....

I want to use data validation to allow a drop down list in a cell but only
if certain criteria are met.

e.g. If A1="yes" then show yes in the validation cell, if b1="no" then show
no, if not then shown the dropdown list for yes/no

At the moment i have the validation in cell d1 as a list with this formula:
=IF(OR(A1="",B1=""),YESNO,IF(A1="YES","YES",IF(B1= "NO","NO",YESNO))))

With the name of my list being yesno

thanks for any help



--
Debra Dalgleish
Contextures
http://www.contextures.com/tiptech.html



Debra Dalgleish

List if criteria are met
 
You could also add a formula to the cell:

=IF(A1="Yes","Yes",IF(B1="No","No","--Select--"))

but if users select from the dropdown list their selection will replace
the formula.

franko wrote:
Looks like both you and Bob are saying the same thing.

This solution does work because it will not allow users to enter an invalid
answer. But i am guessing that there is no way of having the "yes" to fill
in all the other cells if my criteria are met??

If not.... no worries and thanks to you both.


"Debra Dalgleish" wrote:


In your YESNO range, select the Yes cell, and name it YES, and select
the No cell, and name it NO.

In the Data Validation formula, refer to these ranges:

=IF(A1="Yes",YES,IF(B1="No",NO,YESNO))

franko wrote:

can anyone help....

I want to use data validation to allow a drop down list in a cell but only
if certain criteria are met.

e.g. If A1="yes" then show yes in the validation cell, if b1="no" then show
no, if not then shown the dropdown list for yes/no

At the moment i have the validation in cell d1 as a list with this formula:
=IF(OR(A1="",B1=""),YESNO,IF(A1="YES","YES",IF( B1="NO","NO",YESNO))))

With the name of my list being yesno

thanks for any help



--
Debra Dalgleish
Contextures
http://www.contextures.com/tiptech.html





--
Debra Dalgleish
Contextures
http://www.contextures.com/tiptech.html


Franko

List if criteria are met
 
This should work as i will be able to make the file read only as it is going
to be an automatic quotation system.

Thanks for all your help.

Frank


"Debra Dalgleish" wrote:

You could also add a formula to the cell:

=IF(A1="Yes","Yes",IF(B1="No","No","--Select--"))

but if users select from the dropdown list their selection will replace
the formula.

franko wrote:
Looks like both you and Bob are saying the same thing.

This solution does work because it will not allow users to enter an invalid
answer. But i am guessing that there is no way of having the "yes" to fill
in all the other cells if my criteria are met??

If not.... no worries and thanks to you both.


"Debra Dalgleish" wrote:


In your YESNO range, select the Yes cell, and name it YES, and select
the No cell, and name it NO.

In the Data Validation formula, refer to these ranges:

=IF(A1="Yes",YES,IF(B1="No",NO,YESNO))

franko wrote:

can anyone help....

I want to use data validation to allow a drop down list in a cell but only
if certain criteria are met.

e.g. If A1="yes" then show yes in the validation cell, if b1="no" then show
no, if not then shown the dropdown list for yes/no

At the moment i have the validation in cell d1 as a list with this formula:
=IF(OR(A1="",B1=""),YESNO,IF(A1="YES","YES",IF( B1="NO","NO",YESNO))))

With the name of my list being yesno

thanks for any help


--
Debra Dalgleish
Contextures
http://www.contextures.com/tiptech.html





--
Debra Dalgleish
Contextures
http://www.contextures.com/tiptech.html




All times are GMT +1. The time now is 08:58 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com