View Single Post
 
Old 12-06-2011, 10:17 PM
Pragabhava Pragabhava is offline Windows 7 64bit Office 2010 64bit
Novice
 
Join Date: Dec 2011
Posts: 1
Pragabhava is on a distinguished road
Default Show the first item of a drop-down list instead of a blank

Hello. Sorry if this has been asked before, but I can't find how to do it anywere.

The problem is the following:

I need to be able to autofill a drop-down list if some cell is not empty.

To be more clear, suppose that i have a drop-down list
Code:
Apples
Bannanas
Pinapples
in cell B1.

Now, suposse that cell A1 can have a catalog code A, B, or P, or be empty. If it's empty, I want B1 to be the drop-down list, else to be the item specified in A1.

I've narrowed to this:
Code:
Fruits = {Apples, Bannanas, Pinnaples}
and in the Data Validation Box, under "Source" I've the following
Code:
=IF(ISBLANK(A1),Fruits,IF(A1="A",Apples,IF(A1="B",Bannanas,Pinapples)))
This works well, except the drop-down shows an empty cell and one has to manually select Apples or Bannanas or Pinapples, wich defeats the whole purpose.

Any suggestions so cell B1 is automatically filled when A1 is specified, or a drop-down if not?
Reply With Quote