Solved

Excel 2003 avoiding blanks in a drop down list

Posted on 2014-02-04
10
1,384 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
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
 
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

[Webinar] Learn How Hackers Steal Your Credentials

Do You Know How Hackers Steal Your Credentials? Join us and Skyport Systems to learn how hackers steal your credentials and why Active Directory must be secure to stop them. Thursday, July 13, 2017 10:00 A.M. PDT

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article will guide you to convert a grid from a picture into Excel format using Microsoft OneNote and no other 3rd party application.
When you see single cell contains number and text, and you have to get any date out of it seems like cracking our heads.
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.
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

696 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