• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1538
  • Last Modified:

Excel 2003 avoiding blanks in a drop down list

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
thandel
Asked:
thandel
  • 5
  • 4
1 Solution
 
helpfinderIT ConsultantCommented:
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
 
NBVCCommented:
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
 
thandelAuthor Commented:
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
Cloud Class® Course: Microsoft Exchange Server

The MCTS: Microsoft Exchange Server 2010 certification validates your skills in supporting the maintenance and administration of the Exchange servers in an enterprise environment. Learn everything you need to know with this course.

 
NBVCCommented:
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
 
thandelAuthor Commented:
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
 
NBVCCommented:
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
 
thandelAuthor Commented:
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
 
NBVCCommented:
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
 
thandelAuthor Commented:
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
 
NBVCCommented:
Yes, but it doesn't necessarily mean you have to use G2.  You can apply in any available cell.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Upgrade your Question Security!

Your question, your audience. Choose who sees your identity—and your question—with question security.

  • 5
  • 4
Tackle projects and never again get stuck behind a technical roadblock.
Join Now