Dropdown list

G

Guest

Hi
I am new to VBA. I want to create a dropdown list in Sheet1!A1 with data
from Sheet2!A1:A400. I have already filtered the data in Sheet2!. Is there
anyone who knows a short explanation or maybe just know a link for
VBA-beginners?
 
O

Otto Moehrbach

Therese
You don't need VBA for that. Simply name the range in Sheet2 and use
the name in the Data Validation in Sheet1.
Do this:
Select Sheet2.
Click in the name box (right above the "A" of Column A) and type "A1:A400"
without the quotes.
Hit Enter
Now A1:A400 is selected.
Click on Insert - Name - Define.
Type in the range name you wish, any name, say MyRange.
Click OK.
Now go back to Sheet1 and click on the cell in which you want the Data
Validation.
Click on Data - Validation.
In the "Allow:" box, click on the down arrow and select List.
In the "Source:" box, type "MyRange" without the quotes.
Click OK.
Done
HTH Otto
 
G

Guest

Hi Otto
Thanks a lot. There is just one little problem...when the button show, the
only word I can choos is "Produkt" wich is what I called the list instead of
myrange. But thanks for explaning.

"Otto Moehrbach" skrev:
 
G

Guest

Hey thanks. But when I have done it, the only word I can choose is "produkt"
which is what I called the list. What do you think I did wrong? I've done all
the rest.

"Otto Moehrbach" skrev:
 
D

David

=?Utf-8?B?IlQi?= wrote
Hey thanks. But when I have done it, the only word I can choose is
"produkt" which is what I called the list. What do you think I did
wrong? I've done all the rest.

Otto forgot to put an = in front of his Allow List example. In your case,
put =produkt there.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top