Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1
Default Want use results of Drop down list to look up a value

I am using Excel 2002 and I have a multisheet workbook and on the first sheet
I have created a series of 6 drop down lists pulling from predefined named
ranges. I also have limited subsequent choices based on what is selected in
the other lists. The end result is the user will be selecting parameters that
identify a product and now I am stuck with an easy way to look up the
associated part number based on the parameters they selected. Essentially,
once they have chosen the parameters in the list, I would like to create a
macro that uses those values to locate the associated part number.

I would like to know the best way to set up the database such that the macro
will use parameter A, B, C, D, E, and F to then go look up the part number
that satisfies those 6 parameters. Then, I would also like to know the best
way to write a macro to do so.

Thank you.
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 457
Default Want use results of Drop down list to look up a value

Assuming your table is in rows 1 to 1000, a rough macro would look like
this:

Sub FindMe()
A = Parameter1 'Define these properly
B = Parameter2
C = Parameter3
D = Parameter4
E = Parameter5

For i = 1 To 1000
If Cells(i, "A") = A And _
Cells(i, "B") = B And _
Cells(i, "C") = C And _
Cells(i, "D") = D And _
Cells(i, "E") = E Then

'Where do you want output?
Range("G1") = Cells(i, "F").Value
Exit For
End If
Next
End Sub


--
Best Regards,

Luke M
"Rob Van Pelt" <Rob Van wrote in message
...
I am using Excel 2002 and I have a multisheet workbook and on the first
sheet
I have created a series of 6 drop down lists pulling from predefined named
ranges. I also have limited subsequent choices based on what is selected
in
the other lists. The end result is the user will be selecting parameters
that
identify a product and now I am stuck with an easy way to look up the
associated part number based on the parameters they selected. Essentially,
once they have chosen the parameters in the list, I would like to create a
macro that uses those values to locate the associated part number.

I would like to know the best way to set up the database such that the
macro
will use parameter A, B, C, D, E, and F to then go look up the part number
that satisfies those 6 parameters. Then, I would also like to know the
best
way to write a macro to do so.

Thank you.



  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2
Default Want use results of Drop down list to look up a value

I think I understand some of what you are describing but I let me clarify. If
I understand what you are saying, I would use column F to define the part
number associated with the combination of parameters in columns A thru E. So
if each parameter had 5 possible values, I would need to use rows 1 to 3125
to cover every possible combination, correct? (5 to the 5th power). Rows 1
thru 625 would all have identical A parameters, rows 1 thru 125 would also
all have identical B parameters, rows 1 thru 25 would also all have identical
D parameters, and rows 1 thru 5 would be each unique E parameter and then
that pattern would repeat 5 more times, correct?

I think that helps, just a lot of data entry to get it set up.

Thanks!

"Luke M" wrote:

Assuming your table is in rows 1 to 1000, a rough macro would look like
this:

Sub FindMe()
A = Parameter1 'Define these properly
B = Parameter2
C = Parameter3
D = Parameter4
E = Parameter5

For i = 1 To 1000
If Cells(i, "A") = A And _
Cells(i, "B") = B And _
Cells(i, "C") = C And _
Cells(i, "D") = D And _
Cells(i, "E") = E Then

'Where do you want output?
Range("G1") = Cells(i, "F").Value
Exit For
End If
Next
End Sub


--
Best Regards,

Luke M
"Rob Van Pelt" <Rob Van wrote in message
...
I am using Excel 2002 and I have a multisheet workbook and on the first
sheet
I have created a series of 6 drop down lists pulling from predefined named
ranges. I also have limited subsequent choices based on what is selected
in
the other lists. The end result is the user will be selecting parameters
that
identify a product and now I am stuck with an easy way to look up the
associated part number based on the parameters they selected. Essentially,
once they have chosen the parameters in the list, I would like to create a
macro that uses those values to locate the associated part number.

I would like to know the best way to set up the database such that the
macro
will use parameter A, B, C, D, E, and F to then go look up the part number
that satisfies those 6 parameters. Then, I would also like to know the
best
way to write a macro to do so.

Thank you.



.

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2
Default Want use results of Drop down list to look up a value

I have done as Luke M suggested but and have assigned the macro to a Command
Button. I am not getting the value to display in the target cell. Any
suggestion about that?

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
drop down list based on other drop down list pick Ruth Excel Discussion (Misc queries) 1 August 25th 09 05:12 PM
Drop down list dependant on previous drop down list Tenacioushail Excel Discussion (Misc queries) 1 July 1st 08 12:35 PM
Drop Down List choice selecting another drop down list CVD0722 Excel Worksheet Functions 3 October 31st 06 02:02 PM
Concatenate Results from a Validated Drop Down List Debra Dalgleish Excel Discussion (Misc queries) 1 April 27th 06 09:58 PM
multiple select from the drop down list in excel. list in one sheet and drop down in sriramus Excel Discussion (Misc queries) 5 October 27th 05 07:55 PM


All times are GMT +1. The time now is 12:50 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"