Hi!
There is a long alphabetized list of clients on the worksheet, and column E contains their last name. At the top of the sheet, there is one button for each letter. Using the code below, you click on the letter you want, and the page jumps to the first row that contains that letter. It works awesome, but I'm looking for it to select the same row, but column D, instead of column E.
How do I modify the code below to select column D instead of E?
Dim Btn As Object
Dim cell As Range
Dim Ltr As String
Dim rng As Range
Set Btn = ActiveSheet.Shapes(Application.Caller)
Ltr = Btn.TextFrame.Characters.Text
Set rng = ActiveSheet.Range("E10", Cells(Rows.Count, "E").End(xlUp))
For Each cell In rng
If StrComp(Left(cell, 1), Ltr, vbTextCompare) = 0 Then
cell.Activate
Exit For
End If
Next cell
End Sub
Thanks!
Bookmarks