How can I get the listbox to show more than 20 lines?

User avatar
geecee
3StarLounger
Posts: 357
Joined: 02 Jun 2013, 05:55
Location: Australia - SOUTH MORANG - A northern suburb of the city of MELBOURNE in the state of Victoria

How can I get the listbox to show more than 20 lines?

Post by geecee »

The data list in the attached programme has 35 items but the listbox only shows 20. How can I fix it so that the listbox shows the 35 - or can't I?

This is a test programme as the list I intend to use will be ??? number of items.

Any help will be appreciated. :thankyou:
MYLIST_TESTING_MODEL2.xlsm
You do not have the required permissions to view the files attached to this post.
George

When we're gaun up the hill o’ fortune, may we ne'er meet a frien' comin' doun!
(When we are going up the hill of fortune, may we never meet a friend coming down!)

:smile: Don't cry because it's over...Smile because it happened.l :smile:

:note: At the end of the day it's midnight. :note:


User avatar
Rudi
gamma jay
Posts: 25455
Joined: 17 Mar 2010, 17:33
Location: Cape Town

Re: How can I get the listbox to show more than 20 lines?

Post by Rudi »

Hi George,

Your initial validation rule for the drop down was only going down to A21, whereas your list was extending past that already.
SC1.jpg
In order for this to be maintained automatically it is best to convert your source list into a table (that is essentially a dynamic range name).
Then you can put the range name into the source of the validation drop down. In this particular case, it would not be possible to just use the table name, as your table had more than one column. So to overcome this, one would have to reference it in an INDIRECT function and extract specifically the column you want to reference. See the image below.
SC2.jpg
I have attached the updated workbook as well. I have modified the VLOOKUP to reference the table and I also used a formula to reference sheet 2 from sheet 3. Your macro does not make much sense (and unless I am missing the point of it, it is not really necessary?!)
MYLIST_TESTING_MODEL2.xlsm
You do not have the required permissions to view the files attached to this post.
Regards,
Rudi

If your absence does not affect them, your presence didn't matter.

User avatar
geecee
3StarLounger
Posts: 357
Joined: 02 Jun 2013, 05:55
Location: Australia - SOUTH MORANG - A northern suburb of the city of MELBOURNE in the state of Victoria

Re: How can I get the listbox to show more than 20 lines?

Post by geecee »

Rudi

Thanks for your reply. Very much appreciated. :cheers:
George

When we're gaun up the hill o’ fortune, may we ne'er meet a frien' comin' doun!
(When we are going up the hill of fortune, may we never meet a friend coming down!)

:smile: Don't cry because it's over...Smile because it happened.l :smile:

:note: At the end of the day it's midnight. :note: