![]() |
Dropdown list
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? -- Therese |
Dropdown list
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 "Therese" wrote in message ... 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? -- Therese |
Dropdown list
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: 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 "Therese" wrote in message ... 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? -- Therese |
Dropdown list
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: 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 "Therese" wrote in message ... 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? -- Therese |
Dropdown list
?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. -- David |
Dropdown list
Wow...it worked. Excellent, I'm truly impressed!
Thanks and Merry X-mas :-) -- Therese "David" skrev: ?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. -- David |
Dropdown list
David
You got me on that one. Thanks for correcting that. Otto "David" wrote in message ... ?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. -- David |
All times are GMT +1. The time now is 06:49 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com