Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
searching for a value...
Hi All,
I have the below coding attached to userform1. Everytime combobox1 changes(selecting supplier name), it queries the sheet Suppliers, and returns back the corresponding supplier number if it's available. In the Supplier sheet, Column A is the supplier name and Column B is the supplier number. Now, what i also need to do, is at the same time, but on a different sheet (RecData), is bring in two fields of data into variables. On the RecData sheet, Column A = Supplier name, Col B = supplier number, Col C = Last reconciliation date, and Col D = priority number. RecData doesn't contain the same amount of suppliers as in thte supplier sheet, therefore i cant use the ListIndex from the combobox. Is there another way i can bring in these two variables? Im not sure on what the best type find/search i can use. Cheers, Tony. --------------------------------------- Private Sub ComboBox1_Change() Dim r As Range Dim s As Range Dim t As Range With Sheets("Suppliers") On Error Resume Next Set r = .Range("A1")(UserForm1.ComboBox1.ListIndex + 1, 2) If Err.Number = 1004 Then Label3.Caption = "N/A" End If Label3.Caption = r strSuppNum = r End With 'With Sheets("RecData") 'This is where i can't figure out what to do... ' strRecLstCom = s ' strSuppPriNum = t 'End With End Sub |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Searching, matching then searching another list based on the match | Excel Discussion (Misc queries) | |||
searching for tab | Excel Discussion (Misc queries) | |||
Searching | Excel Worksheet Functions | |||
searching | Excel Worksheet Functions | |||
VBA searching a row | Excel Programming |