Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 95
  • Last Modified:

how to get rid of blank area in drop down of a dependent list

dear experts,

I column C of the attached file, I have a dropdown list. There is some extra space in the drop down which I want to get rid of. How do I do this?
ee-blank-area-dropdown.xlsx
0
Leonardo M
Asked:
Leonardo M
  • 7
  • 3
1 Solution
 
Rob HensonIT & Database AssistantCommented:
The blank area represents the blank cells at the end of your validation lists. To get rid of the blanks in the dropdown, you need to make the validation list area smaller or better still would be to make it dynamic, ie the range changes based on its contents.

Is that something you want to consider?
0
 
Rob HensonIT & Database AssistantCommented:
Would you consider changing the ranges for AA, BB etc to columns rather than rows?
0
 
Subodh Tiwari (Neeraj)Excel & VBA ExpertCommented:
Select the range I12:O15, press Ctrl+G --> Special --> Choose Constant --> OK --> Formulas Tab --> Under Defined Names --> Choose Create from selection --> Choose Left Column --> Click OK to replace the existing named ranges.
1
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
Rob HensonIT & Database AssistantCommented:
@Neeraj - as a one off change that is a good method that I have not seen before. Being dynamic though would mean the definition would change as the contents change.
0
 
Subodh Tiwari (Neeraj)Excel & VBA ExpertCommented:
@Rob
Thanks. As far as I know the dynamic named ranges won't work with Indirect function used in Data Validation.
Have you tried creating dynamic named ranges and referring them within Indirect function in the data validation? I remember I tried it once and it didn't work for me.
0
 
Rob HensonIT & Database AssistantCommented:
Yep, just found that for myself. I am off to try something else then!!!
0
 
Rob HensonIT & Database AssistantCommented:
Based on the current layout, change the formula in the data validation for C2 to:

=OFFSET(I1,MATCH($B$2,I:I,0)-1,1,1,COUNTA(INDIRECT(MATCH($B$2,I:I,0)&":"&MATCH($B$2,I:I,0)))-1)

So rather than creating several dynamic ranges to use within the INDIRECT function, create one dynamic range within the DV.

No doubt the current layout is not completely representative of the true working document so it will no doubt need amending.

Thanks
Rob
2
 
Subodh Tiwari (Neeraj)Excel & VBA ExpertCommented:
Good one Rob! :)
0
 
Rob HensonIT & Database AssistantCommented:
Thanks Neeraj. Only good in this particular scenario which I think is unrealistic. For starters this relies on the remainder of the rows holding the lookup data being blank.
0
 
YamaafgCommented:
Follow below steps:
 
1.      Select I12 to O15
2.      Press Ctrl + G
3.      Select Special
4.      Select Blank
5.      Select OK
6.      Right click on one of the black cells
7.      Select delete
8.      Select Shift cells left and click ok
0
 
Rob HensonIT & Database AssistantCommented:
Not even assisted points for Neeraj and myself???
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

  • 7
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now