Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I need to create a dropdown list in sheet A based on the values in sheet B in column A. I clicked on the A column in B sheet and named it as Models. Then I clicked on the cell in sheet A where I wanted the list to be and selected Data -> Data validation -> Data validation. In the Settings page I selected List in the Allow section, checked Ignore blank and In-cell dropdown. In the Source section I inserted =Models.

This way I get all the right values plus a lot of blank values. How do I prevent the blank lines from appearing in the list?

share|improve this question
    
Nice clear question, good explanation and well formatted , thank you! –  pnuts Oct 20 '12 at 11:45
1  
format the range as an Excel Table,, the range will automatically expand when you add new rows –  Aprillion Oct 21 '12 at 15:47

1 Answer 1

You can use a Dynamic Named Range to specify the validation lint

Assuming the list data start at cell B!A1 and extends down without gaps, put this in the List reference

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

This formula adapts to the number of entries in B!A:A, so if you add or delete data, the validation list automatically adapts

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.