Variable ranges in dropdown list

ElvisSteel

Board Regular
Joined
Mar 23, 2009
Messages
122
I need to define a dropdown list (either using a combo box or an in-cell dropdown) but the input range (which contains 10 cells) will not always be fully populated. I tried to define a variable range name using offset to only include populated cells, but I can't get it to work.
Details are:
Cells A1:A10 contain data, but not always full, i.e. sometimes only data in A1:A5 or A1:A8 etc. A1:A10 is named as "InputData"
Cell D1 originally set up with data validation with List on range "=InputData" , but this means blanks can be selected when InputData not full. I then tried to define InputData as "=Offset($A$1,0,0,COUNTA(A1:A10),1)" but the dropdown then shows only blanks.
Any help greatly appreciated.
 

Excel Facts

What is the fastest way to copy a formula?
If A2:A50000 contain data. Enter a formula in B2. Select B2. Double-click the Fill Handle and Excel will shoot the formula down to B50000.
I tried this putting $ signs around the range,

=Offset($A$1,0,0,COUNTA($A$1:$A$10),1)

and it seemed to work ok

any help?
 
Upvote 0

Forum statistics

Threads
1,214,812
Messages
6,121,704
Members
449,048
Latest member
81jamesacct

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top