Ignore blanks in Dropdown list from form control

I'm using a dropdown list from the form control and populating it with a named range which gets its data from

=MarkEntry!$A$7:$A$108

The range accommodates about a 100 students, sometimes there are less, but the last row is always needed in the dropdown, because it has the class average. How would I ignore the blank lines when populating the dropdown.
zerogAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

gowflowCommented:
Several ways

1) A small VBA can do this eliminating blanks to fill the dropdown
2) A VBA to sort the data and only capture data except blanks

Your choice
gowflow
0
gowflowCommented:
You also may want to look at this link

http://www.cpearson.com/Excel/noblanks.htm

gowflow
0
zerogAuthor Commented:
My knowledge with VBA scripting is limited ... any samples or leads that can assist?
0
Why Diversity in Tech Matter

Kesha Williams, certified professional and software developer, explores the imbalance of diversity in the world of technology -- especially when it comes to hiring women. She showcases ways she's making a difference ithrough the Colors of STEM program.

gowflowCommented:
Sure no sweat just post your sample workbook so this way the solution will be adapted exactly to your need.
gowflow
0
zerogAuthor Commented:
Thank you. See the second dropdown list on the "IndividualGraph" sheet.
Graphs.xlsx
0
gowflowCommented:
ok here it is I created in sheet in Col BA7 and down the following formula as Array (CTRL,SHIFT,ENTER) and I called this new Range NoBlankCell
=IFERROR(INDEX($A$7:$A$108,SMALL((IF(LEN($A$7:$A$108),ROW(INDIRECT("1:"&ROWS($A$7:$A$108))))),ROW(A1)),1),"")

Open in new window


Then I modified your Range Name to be as follows:
=OFFSET(NoBlankCell,,,COUNTA(NoBlankCell)-COUNTBLANK(NoBlankCell))

Open in new window


Now check if this is what you want. I deliberately created stupid names as you can see in different rows to make sure it is working properly.

NOTE
I have to thank you for your question as I am not a 'Formula' Guy but rather a VBA one but seems the challenge and your extensive use of Named Ranges got me to fix it this way.

Regards
gowflow
Graphs.xlsx
0
zerogAuthor Commented:
Thanks gowflow for your solution. The dropdown works as I wanted. I just notice that the class average no longer plots on the graph. I get a #VALUE!
Must be something to do with the referencing. I'm just wondering would a VBA solution avoid that from happening?
0
gowflowCommented:
Wait Wait.

What is the Class average ? In what sheet ??? If in IndividualGraph the file you posted did not have the Average !!! In Summary the Average is there.

Pllsadvise
gowflow
0
zerogAuthor Commented:
Below the graph on the "IndividualGraph" sheet there's a table that displays the data for the selection from the dropdown lists. If you choose class average from the second dropdown the table no longer populates.
0
gowflowCommented:
I see what you mean let me look at it and will revert.
gowflow
0
gowflowCommented:
ok here it is:

I had to create a new name range and put this formulas.
DB_Selected_Blank
=MATCH(IndividualGraph!$B$26,MarkEntry!$A$7:$A$108,0)

Then I modified the formula in C26 onward to take into consideration the correct row of this item as the problem rised from the fact that Class Average and other items were taking a sequential row count (7 for this one) instead of 102 and as in row 7 the data was null you were getting a division by 0 reason why the formula was wrong.

So this new formula fixed it.
=VALUE(INDEX(DB_Table1,DB_Selected_NoBlank,C$22))

PLs check it and let me know.
gowflow
Graphs-V01.xlsx
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
zerogAuthor Commented:
Perfect. Thank you for all your help
0
gowflowCommented:
Your welcome, a small comment I did not understand why the first combo does not populate all the names !
gowflow
0
zerogAuthor Commented:
The first dropdown excludes the Class Average from the name list and the second dropdown includes the Class Average from the name list. It was just a quick workaround to avoid Class Average being compared to Class Average on the graph
0
gowflowCommented:
Ah Ic.
If you need more help pls do not hesitate to put a link to any question you may have in here.

Regards
gowflow
0
zerogAuthor Commented:
Thank you. Much appreciated
0
gowflowCommented:
Your welcome
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Excel

From novice to tech pro — start learning today.