List valid values if a condition

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hello,
Is there a way to list valid values to select only if a condition is met?
For example, if # of shirts > 0, then allow user to select color (white,
black or red). If # of shirts = 0, then automaticallu populate color with N/A.
Thanks,
 
To create dropdown lists in the cells, you can use data validation.
There are instructions here:

http://www.contextures.com/xlDataVal01.html

In your workbook, type the list of colours in a column.
Name this list, e.g. ColourList
There are instructions here for naming ranges:
http://www.contextures.com/xlNames01.html

In another column, type: N/A
Name this cell, e.g. NAList

Select the cells in which you want the lists
Choose Data>Validation
For Allow, choose List
In the Source box, type a formula that refers to the cell
with the number of shirts, e.g.:
=IF(C2>0,ColourList,NAList)
Click OK
 

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