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
Solved

Excel 2003 avoiding blanks in a drop down list

Posted on 2014-02-04
10
1,328 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
Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
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

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Convert between Excel file formats (.XLS, .XLSX, .XLSM) with/without macro option David Miller (dlmille) Intro Over this past Fall, I've had the opportunity to see several similar requests and have developed a couple related solutions associate…
Freeze panes is an option within all variants of Excel to enable parts of a sheet to remain stationary when the cursor is in another part of the sheet. This is a very useful feature which is overlooked or under used.
This Micro Tutorial demonstrates using Microsoft Excel pivot tables, how to reverse engineer competitors' marketing strategies through backlinks.
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

860 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