Drop Down Dead!

nigelandrewfoster

Well-known Member
Joined
May 27, 2009
Messages
735
I have a drop down list in one of my cells. The table it takes the list from contains a number of unused slots at the bottom (blanks). For some reason, when I click the button to display the list, it starts by displaying the bottom of the table - so you have to scroll UP through the list. This will confuse users as the bottom values are blank, if you understand me. How can I get the list to be displayed from the top (which seems a more logical thing for Excel to do anyway). Thank you for your interest.
 

Some videos you may like

Excel Facts

What is the last column in Excel?
Excel columns run from A to Z, AA to AZ, AAA to XFD. The last column is XFD.

gecs

Active Member
Joined
Jan 26, 2009
Messages
320
Name the range you're using as a source for that drop-down using a dynamic range formula, something like:

=OFFSET($A$1,0,0,COUNTA($A:$A))

and use that name in the Data Validation formula (=name).

This will remove the blank rows and the drop-down will be displayed from the top. The drop-down will start displaying with the first match of the cell's value in the list and because the cell is initially blank...
 

nigelandrewfoster

Well-known Member
Joined
May 27, 2009
Messages
735
Thanks for your very helpful reply. I understand the logic of what you said and I'm sure it will work. However, please can you clarify the first bit? My range is currently called "alpha_prod" and it is defined as ='DIRECT INPUT'!$M$4:$M$196.
 

gecs

Active Member
Joined
Jan 26, 2009
Messages
320
Using the Name Manager (Ctrl+F3) change the formula (Refers to: ) for the name "alpha_prod" to:

=OFFSET('DIRECT INPUT'!$M$4,0,0,COUNTA('DIRECT INPUT'!$M$4:$M$203))

The range used in the COUNTA function has to be large enough to accommodate the record numbers expected to be added in time - you may change this range to a larger one if you think that the number of items on column M will increase to more than 200 in time. If you have only 5 cells in the 'DIRECT INPUT'!$M$4:$M$203 range, the formula will return the range with only 5 rows, when you add more data into that range (with no blank cells in between) the OFFSET based formula will return a range with those new data included - that's why it is called "dynamic".
 

nigelandrewfoster

Well-known Member
Joined
May 27, 2009
Messages
735
Thanks, that's great. I had read a little about dynamic ranges, and how they relate to expanding bar charts as you add data, but your explanation is clearer.
 

Subscribe on YouTube

Watch MrExcel Video

Forum statistics

Threads
1,106,803
Messages
5,513,506
Members
408,954
Latest member
Tiaame

This Week's Hot Topics

  • Sort code advice please
    Hi, I have the code below which im trying to edit but getting a little stuck. This was the original code which worked fine,columns A-F would sort...
  • SUMPRODUCT with nested If statement
    Hi everyone, Hope you're all well. I'm hoping someone will be able to point me in the right direction with a problem I'm having with a SUMPRODUCT...
  • VBA - simple sort is killing me!
    Hello all! This should be so easy, but not for me, apparently! I have a table of data that can be of varying lengths and widths. My current macro...
  • Compare Two Lists
    I have two Lists and I need to be able to Identify differences between them. List 100 comes from a workbook - the other is downloaded form the...
  • Formula that deducts points for each code I input.
    I am trying to create a formula that will have each student in my class start at 100 points and then for each code that I enter (PP for Poor...
  • Conditional formatting formula required for day of week and a value
    Hi, I have a really simple spreadsheet where column A is the date, column B is the activity total shown as a number and column C states the day of...
Top