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

Pivot Table Drill Down
Double-click any number in a pivot table to create a new report showing all detail rows that make up that number

xlHammer

Board Regular
Joined
Apr 7, 2008
Messages
215
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?
 

Forum statistics

Threads
1,136,954
Messages
5,678,751
Members
419,782
Latest member
gc75150

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
Top