need some suggestions on how to solve my problem

K

kiwis

Hi

I need some suggestions/directions/ideas on how to solve my problem.

Description of my problem:

I have some data ranging from column A to HH & ocuppying 25 rows,
which i
call my database. column C will contain id, A will contain pdt_name,
etc
My data will change but the format & header for the column will remain
the same.

on a summary worksheet, i want to allow user to select id(most likely
from a drop down list) & then all/most of the data(from column A to
HH) corresponding to the id to be shown from cell D1.

the drop down list will be dynamic as it depends on the raw data in
column C.
How do i create the drop down list that is of this kind of nature?

I do not need to ask user to enter new product item into my raw data.
I just need to query for a specific product item & then display the
details on the summary worksheet.

I don't have any ideas on how to go about to tackle this problem.

Thank you for reading.

kiwis
 
M

Mike Fogleman

You can create the list from any means you choose, this example is when the
summary sheet is activated when the code is placed in that sheets' code
module.

Private Sub Worksheet_Activate()
Dim LRow As Long
Dim rng As Range

LRow = Cells(Rows.Count, 3).End(xlUp).Row
Set rng = Range("C2:C" & LRow)
Me.ListBox1.ListFillRange = rng.Address
End Sub

Then from the Private Sub ListBox1_Click() event you would do a Find on the
value and display the appropriate columns from that row.

Mike F
 
D

dq

Another option: If all of your ID's are unique (which seems logical
for an ID) you can give this list a name using Insert/Name/Define and
then use data validation to create a dropdown that displays exactly
that list. At the same time the user cannot enter an invalid id in
your field.

DQ
 

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

Top