Solved

Excel 2003 avoiding blanks in a drop down list

Posted on 2014-02-04
10
1,204 Views
Last Modified: 2014-02-07
I have read over some solutions for this issues in Excel but can't follow their solutions to implement.

I have a range of $E$2:$E$12 that is the input range for a drop down list.  The cell link is $G$2.... how can I change this control to not display blanks from the range of E2:E12?
0
Comment
Question by:thandel
  • 5
  • 4
10 Comments
 
LVL 19

Expert Comment

by:helpfinder
ID: 39833748
if you won´t add or remove items from the list, just sort your drop down items A->Z or vice versa and make a range to fit all items exactly
0
 
LVL 23

Expert Comment

by:NBVC
ID: 39833750
You would need to rearrange the range so that the blanks are at the bottom.

IF you can try sorting the list in E2:E12 so that blanks are at the bottom.

Then you can use this as your Source formula in the Data Validation for G2.

=OFFSET($E$2,,,COUNTA($E$2:$E$12,1))

If you can't sort, then start a new list say in F2 with formula:

=IFERROR(INDEX($E$2:$E$12,SMALL(IF($E$2:$E$12<>"",ROW($E$2:$E$12)-ROW($E$2)+1),ROWS($F$2:$F2))),"")

confirmed with CTRL+SHIFT+ENTER not just ENTER and copied down to F12.

Now your Source formula for Data Validation in G2 would be:

=OFFSET($F$2,,,COUNTIF($F$2:$F$12,"?*"),1)
0
 

Author Comment

by:thandel
ID: 39833763
Thanks List is sorted and blanks are at bottom but number of blanks varry.  I'm not following:
"Then you can use this as your Source formula in the Data Validation for G2"

Is this part of the drop down properties?
0
 
LVL 23

Accepted Solution

by:
NBVC earned 500 total points
ID: 39833785
Instead of referencing the range E2:E12 for your data validation replace that with the formula as a reference:

=OFFSET($E$2,,,COUNTA($E$2:$E$12,1))

so go to G2, then Data Validation, replace what you have in the Source field with the above formula.

If $E$2:$E$12 is a named range, called List, replace that in the formula:

=OFFSET($E$2,,,COUNTA(List,1))
0
 

Author Comment

by:thandel
ID: 39833888
I don't have any data validation... its a preselect list so no validation is needed... however when I look in the data validation I don't see any options as you have listed for this.  There is no "source field" for G2.  I've attached a screen shot for assistance.
Screen.jpg
0
How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

 
LVL 23

Expert Comment

by:NBVC
ID: 39833892
So how are you making selections from that list then?

In that window, you have to select List from the Allow menu first, then a Source field will show at the bottom, where you enter the formula.
0
 

Author Comment

by:thandel
ID: 39833949
I'm not following which window you are referring to... the window in the screen capture I sent?  I'm not seeing anything like that.
0
 
LVL 23

Expert Comment

by:NBVC
ID: 39833961
Yes, in the screen shot you sent, do you see where it says Allow and then in the white field it says "Any Value"?  Click the drop down and you can select "List".

After you make that selection, another white field will show below entitled "Source".  That is where you enter the validation formula.

If you can attach your workbook, I can show you....
0
 

Author Comment

by:thandel
ID: 39834039
Ah I see so basically I'm ditching my original drop down and using G2 which now turned into a drop down... am I following correctly?
0
 
LVL 23

Expert Comment

by:NBVC
ID: 39834218
Yes, but it doesn't necessarily mean you have to use G2.  You can apply in any available cell.
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Drop Down List with Unique/Distinct Values (Part II - ComboBox or ListBox and Data Validation List Bonus!) David Miller (dlmille) Intro This article focuses on delivering unique, sorted lists to list objects (e.g., ComboBox, ListBox) and Dat…
Approximate matching with VLOOKUP and MATCH seems to me to be a greatly under-used technique, and one which is vital for getting good performance out of large lookups. Until recently I would always have advised using an exact match for simplicity an…
The viewer will learn how to create two correlated normally distributed random variables in Excel, use a normal distribution to simulate the return on different levels of investment in each of the two funds over a period of ten years, and, create a …
This Micro Tutorial will demonstrate how to create pivot charts out of a data set. I also added a drop-down menu which allows to choose from different categories in the data set and the chart will automatically update.

746 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now