简体   繁体   中英

give drop-down list if condition not matched

wanting to use an IF statement (or whatever will do the job) to populate a cell (cell B) based on what was entered in another cell (Cell A), but if Cell A doesn't = x, then I want users to be able to select an answer from a drop-down list

eg =IF(B23="Softphone", "Yes", drop-down list )

So if Cell A = Softphone, then Cell B is auto-populated with 'Yes'. If Cell A = anything else, then Cell B becomes a drop-down list

Is this possible?

I may be wrong but I don't think you can do that with IF statements ie returning a drop-list if the False condition is returned in your IF statement.

However, you can work around this with a slightly different layout on your worksheet. Try this formula:

=IF(B23="Softphone", "Yes",IF(D23="","Select option in column D",D23))

In column D (using the Excel ribbon, select Data and then Data Validation), create a drop-down list of what you want if it's not "Softphone" in column B.

Then, if the input in column B isn't "Softphone", it'll ask the user to select an option from the drop-down list in column D. And if it's blank - it'll show show as a default of 'Select option in column D' like a prompt to the user.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM