Link to home
Start Free TrialLog in
Avatar of joeserrone
joeserrone

asked on

Excel avoid blak spaces in a dropbox

I'm attaching a sample of my spreadsheet. As you can see in cell G4 I created a dropbox based on a namedRange called ProjectDescription, which is located in Column B. This list is not always this small, sometimes the list can be 100 records or more, sometimes maybe only 20. Right now I have placed the named range to include 2000 records, yet when I click on the dropbox in column G I get blank fields. Is there a way for the dropbox to identify somehow the range based on the number of records contained in column B ?
Test.xlsx
Avatar of Martin Liss
Martin Liss
Flag of United States of America image

This will give you the last row.

Dim lngLastRow As Long
lngLastRow = Range("B65536").End(xlUp).Row
Avatar of joeserrone
joeserrone

ASKER

Hi MartinLiss, your code make sense but how can I apply it to my dropbox in the spreadsheet?
ASKER CERTIFIED SOLUTION
Avatar of Flyster
Flyster
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
That Worked! Thank you!!!
You're welcome. Glad I could help!