Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Find Selected value to .Offset from
Private Sub ComboBox23_DropButtonClick()
Application.ScreenUpdating = False If ComboBox23.ListCount 0 Then Exit Sub Dim lastcell As Long Dim myrow As Long lastcell = workSheets("InspectionData").Cells(Rows.Count, "A").End(xlUp).Row With ActiveWorkbook.workSheets("InspectionData") For myrow = 2 To lastcell If .Cells(myrow, 1) < "" Then If .Cells(myrow, 1).Offset(-1, 2).Text = TextBox250.Text And ..Cells(myrow, 1).Offset(0, 0).Value = ComboBox2.Text And IsNumeric(Trim(Mid(.Cells(myrow, 1), 2))) = True Then For i = 2 To 22 If Cells(myrow, 3).Offset(i, 0).Value < "" Then ComboBox23.AddItem Cells(myrow, 3).Offset(i, 0) ComboBox23.List(ComboBox23.ListCount - 1, 1) = Cells(myrow, 3).Offset(i, 0).Address End If Next i End If End If Next End With Application.ScreenUpdating = True End Sub The above code populates a list into Combobox23. What i want to do is gain the value of the cell (.Offset(0,7)) from the value that WAS Selected in the Combobox. I want: Textbox2.value = Combobox23.Selection.Offset(0,7) ??????? I am sure i can add something here but it has avoided me getting it to work. Can anyone see how to do this ? Corey.... |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Use of OFFSET and LOOKUP to find a value in a table | Excel Discussion (Misc queries) | |||
Find, Copy offset to offset on other sheet, Run-time 1004. | Excel Programming | |||
Find then offset. | Excel Worksheet Functions | |||
Formula to find last value in a range & then offset | Excel Worksheet Functions | |||
Find, Offset, Enter Number | Excel Programming |