Forum Discussion

tomc72's avatar
tomc72
Brass Contributor
Dec 29, 2019
Solved

Go To a cell with a specific value using a combo or list box.

Hi there, Can anyone tell me how to go to a cell containing the value entered in a combo box, please? Thank you very much. Tom
  • Riny_van_Eekelen's avatar
    Dec 30, 2019

    tomc72 

    Not sure if understood your requirement, but if you wish to select a cell of which the reference is selected in the ComboBox, the following simple VBA code does the trick:

     

    Sub Dropdown1_Change()
    
    Dim JumpTo As String
    Dim RowNum As Integer
    
    RowNum = ThisWorkbook.Sheets("Sheet1").Range("B1")
    
    JumpTo = ThisWorkbook.Sheets("Sheet1").Cells(RowNum, 1)
    
    Range(JumpTo).Select
    
    End Sub

    It is based on the assumption that the Input Range is in the column A (i.e. first column) and that the Cell Link is set to B1. 

    The attached workbook includes a working example. If this is not what you had in mind, please clarify what you want to achieve.

     

     

Resources