Drop Down Menus

April 9, 2009 at 09:32:21
Specs: Windows XP, 1.0 Gb
I have drop down menus that are linked to IF statements. These menus have five choices, each linked to a different IF statement. Once the drop down is used, the choice stays visible and the appropriate cell is filled by the IF statement. Is it possible to have a blank as a choice in these menus so that the appropriate cell stays blank?

See More: Drop Down Menus

Report •


#1
April 9, 2009 at 10:27:17
Assuming the Drop Down is the result of a Validation List, include a blank cell in the range that makes up the list and you'll get a blank in the Drop Down.

Then adjust your IF statements to deal with a "".

=IF(A1="","",whatever)


Report •

#2
April 9, 2009 at 11:02:45
Thank you; your solution worked the way I needed.

Report •

#3
April 12, 2009 at 09:36:33
The IF statements that I had previously used were incorrect and were rewritten. The prior IF statements allowed me to <delete> a drop down menu category which caused the corresponding linked cell to become blank. I need this feature as all of the drop down menus within the column are not always used.

While I was succesfull creating the drop down menu the first time using the old IF statements, this time I couldnt get it correct. I tried to create a blank choice in the down drop menu by using Data>Validation>List and then enter the categories followed by a comma, but that didn't work.

When I try to <delete> a drop down category using the new IF statement which is =if(c11=tally!$g$35,Vlookup(BB11,Tally!$F35:$V47,5,0),..., I get "#N/A". It would seem to me that the reference for having a blank cell as an option in the down drop menu should be included in the IF statement but I don't know where.

Thank you.



Report •

Related Solutions

#4
April 12, 2009 at 10:31:32
You can add a blank choice by entering the final comma and then adding a space. BTW...you can also use a List from a range of cells instead of entering the list in the Data Validation dialog box. That way you could change the list and not have to update the Data Validation list for each cell that uses it. Adding a blank cell anywhere in that list will put a blank cell in your drop down.

Add this to your mindset as you are creating a workbook:

If you find yourself doing the same thing over and over again in a number of cells, then Excel probably has a more efficient way of doing it. e.g. referencing a list in a single range of cells instead of typing that data over and over again in multiple locations.

When VLOOKUP doesn't find what it is looking for, it returns a #NA error. So we either need to tell the VLOOKUP function what to do with a blank cell or have the formula deal with the blank cell before it even gets to the VLOOKUP portion.

Add the bold portion to the front of your formula:

=IF(BB11="",0,IF(C11=Tally!$G$35,VLOOKUP(BB11...etc

Don't forget to add the extra parenthesis at the end of the formula to close off the new one you added at the front.


Report •

#5
April 13, 2009 at 12:32:00
The addition to the IF statements worked as needed. I then added the blank to the drop down menu without any difficulty; however, when I tried to use a range of cells from a different worksheet in the Data Validation dialog box, I was unsuccessful and got the error message "You may not use references to other worksheets or workbooks for Data Validation criteria." Is it a good practice, therefore, to include the necessary range of cells on the target spreadsheet in a location that will not be printed?

Thank you.


Report •

#6
April 13, 2009 at 14:58:21
Remember the email lesson on Named Ranges?

Create a named range anywhere in the workbook and use

=range_name


Report •

#7
April 15, 2009 at 19:56:31
Dear DerbyDad03,

I rememebered NAMED RANGES and everything works fine.

Thanks you.


Report •


Ask Question