Forum Discussion
Sue_G
Feb 26, 2021Brass Contributor
GOTO a specific cell, based on another cell's data
I have a spreadsheet where I would like to move to a specific column, based on the data entered. For example: In A1, I enter a name: Joe If Joe is entered, I want to go directly to column J in th...
JMB17
Feb 26, 2021Bronze Contributor
If, by chance, you want it to return to column A after keying the data in another column, then you could change this part:
If Intersect(Target.Cells(1), Me.Range("A:A")) Is Nothing Then
Exit Sub
End If
to:
With Target
If Intersect(.Cells(1), Me.Range("A:A")) Is Nothing Then
With .Cells(.Cells.Count)
If .Row < Me.Rows.Count Then
Intersect(.Offset(1, 0).EntireRow, Me.Range("A:A")).Select
End If
End With
Exit Sub
End If
End With
Sue_G
Feb 26, 2021Brass Contributor
Thank you! I'll make a note of this as I'm not sure this is what I want for this spreadsheet. I wanted the cursor to move to a specific column to enter data, but I have more data to enter in other columns. I just wanted the cursor to go to the first column for that particular name.