View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Pete_UK Pete_UK is offline
external usenet poster
 
Posts: 8,856
Default Macro to retrieve values corresponding to the value selected inDrop down box

You've posted this in a programming group, but you can accomplish what
you want with a formula - put this in J10:

=VLOOKUP(I10,Sheet2!A$2:E$200,2,0)&", "&VLOOKUP(I10,Sheet2!A$2:E
$200,3,0)&", "&VLOOKUP(I10,Sheet2!A$2:E$200,4,0)&",
"&VLOOKUP(I10,Sheet2!A$2:E$200,5,0)

Hope this helps.

Pete

On Aug 25, 11:30*am, Marvin wrote:
Hello all,

I have lot of Drop down boxes in a sheet (Sheet1). Let me consider
"Drop Down 227" for explaning what I'm try to accomplish. Input range
for Values in this drop down box are Sheet2!$A$2:$A$200, which are
populated with text (mix of characters and numbers).

Cells B2 to E2 in Sheet 2 are values corresponding to A2 in Sheet2.
Cells B3 to E3 in Sheet 2 are values corresponding to A3 in Sheet2.
Cells B4 to E4 in Sheet 2 are values corresponding to A4 in Sheet2.
...........
Cells B200 to E200 in Sheet 2 are values corresponding to A200 in
Sheet2.

When the user picks a value from "Drop Down 227" box which resides in
cell I10 in Sheet 1, I would like cell J10 (in Sheet1) to
automatically populate the entries (from Sheet 2) corresponding to
it.
For example, assuming that user has picked the second entry from the
"Drop down 227", then it corresponds to cell A3 in sheet2. So, cell
J10 in Sheet1 should have the values of cells B2 thru E2 from sheet 2,
each seperated by comma.

Hope I've made it clear.

Any help would be much appreciated. If I know how to do this, then I'm
quite sure that I can extend this principle to all drop down boxes in
my worksheet.

Thanks.