Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I am using data from a separate worksheet as a look-up for
the data entry on a primary sheet. After a part no. is entered I'd like the dropdown list for the possible serial numbers to be populated by an array. Of course the serial numbers are different and a specific part no. could have 1 to N serial numbers associated with it. 1. Doing the search is not a problem 2. Determining the indeterminate range of values and loading it in the array may give me some difficultly - suggestions or where to look would be appreciated. 3. Loading a dropdown list is definitely where I may lack the adequate syntax and knowledge. I found an example of populating a User's Form listbox on the support page, but I am not certain it is a possibility. Thanks for any help. MC |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() -- HTH Bob Phillips ... looking out across Poole Harbour to the Purbecks (remove nothere from the email address if mailing direct) "MC" wrote in message ... I am using data from a separate worksheet as a look-up for the data entry on a primary sheet. After a part no. is entered I'd like the dropdown list for the possible serial numbers to be populated by an array. Of course the serial numbers are different and a specific part no. could have 1 to N serial numbers associated with it. 1. Doing the search is not a problem 2. Determining the indeterminate range of values and loading it in the array may give me some difficultly - suggestions or where to look would be appreciated. 3. Loading a dropdown list is definitely where I may lack the adequate syntax and knowledge. I found an example of populating a User's Form listbox on the support page, but I am not certain it is a possibility. Thanks for any help. MC |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
The answer would depend upon how the data is formatted and what DD you are
using (a userform, a worksheet forms DD, Data Validation, or worksheet control). Give us the details. -- HTH Bob Phillips ... looking out across Poole Harbour to the Purbecks (remove nothere from the email address if mailing direct) "MC" wrote in message ... I am using data from a separate worksheet as a look-up for the data entry on a primary sheet. After a part no. is entered I'd like the dropdown list for the possible serial numbers to be populated by an array. Of course the serial numbers are different and a specific part no. could have 1 to N serial numbers associated with it. 1. Doing the search is not a problem 2. Determining the indeterminate range of values and loading it in the array may give me some difficultly - suggestions or where to look would be appreciated. 3. Loading a dropdown list is definitely where I may lack the adequate syntax and knowledge. I found an example of populating a User's Form listbox on the support page, but I am not certain it is a possibility. Thanks for any help. MC |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
for each cell in Worksheets("Data").Range("A1:A5000")
if cell.Value = Worksheets("sheet1").Range("C1").Value then Worksheets("sheet1").Listbox1.AddItem cell.offset(0,1).value end if Next would be one possibility. if you want to build an array Dim Myarray() num = Application.Countif(rksheets("Data").Range("A1:A50 00"), _ Worksheets("sheet1").Range("C1").Value) Redim MyArray(1 to num) j = 0 for each cell in Worksheets("Data").Range("A1:A5000") if cell.Value = Worksheets("Sheet1").Range("C1").Value then j = j + 1 myarray(j) = cell.offset(0,1).value end if Next Worksheets("Sheet1").Listbox1.List = myArray -- Regards, Tom Ogilvy "MC" wrote in message ... I am using data from a separate worksheet as a look-up for the data entry on a primary sheet. After a part no. is entered I'd like the dropdown list for the possible serial numbers to be populated by an array. Of course the serial numbers are different and a specific part no. could have 1 to N serial numbers associated with it. 1. Doing the search is not a problem 2. Determining the indeterminate range of values and loading it in the array may give me some difficultly - suggestions or where to look would be appreciated. 3. Loading a dropdown list is definitely where I may lack the adequate syntax and knowledge. I found an example of populating a User's Form listbox on the support page, but I am not certain it is a possibility. Thanks for any help. MC |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
dropdown lists and populating new table based on the selection | Excel Discussion (Misc queries) | |||
Populating an array | Excel Worksheet Functions | |||
Formula not populating from dropdown box.Works when entered manua | Excel Worksheet Functions | |||
populating DropDown with Values Of a Column in another Sheet. | Excel Discussion (Misc queries) | |||
Populating a 2-D array | Excel Programming |