Moving to a specific cell based on another cell's data.

  • I would like to move to a specific cell within a row based on the data I enter in the first cell. For example, if I enter the name Lonza in cell C2, I would like to have the cursor go directly to cell L2. If I enter the name MP Bio in C2, then I'd like the cursor to go directly to cell P2. If I enter MP Bio in C3, the cursor to go to cell P3, if I enter Lonza in C4, the cursor to go to cell L4, etc. Is this possible? I have attached an example of the file. Column C is a drop down list.

  • Hello,

    You could test the following event macro

    Private Sub Worksheet_Change(ByVal Target As Range)
    If Target.Column <> 3 Then Exit Sub
    If Target = "" Then Exit Sub
    Dim x As Long
    On Error Resume Next
    x = Application.Match(Target, Range("A1:Z1"), 0)
    Application.Goto Cells(Target.Row, x)
    End Sub

    Hope this will help


  • Always very surprised after more than 15 days ... and more than 12 downloads ... to still be waiting for some kind of feedback ...:!:

    If you feel like saying "Thank You" for the help received, do not hesitate to click the "Smiley" icon, below, in the bottom right corner :)

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!