Search request

  • Thread starter Thread starter GregNga
  • Start date Start date
G

GregNga

I would like to be able to do a search by pressing a key on the keyboard and
having Excel position to the first cell in the selected column that begins
with the character of the key pressed. Kind of like in Windows Explorer

Does anyone have a macro to do this or is there another way
 
I would like to be able to do a search by pressing a key on the keyboard and
having Excel position to the first cell in the selected column that begins
with the character of the key pressed. Kind of like in Windows Explorer

Does anyone have a macro to do this or is there another way

This would go into the worksheet module

Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Address = "$A$1" Then
Dim f As Range
Set f = Range("A2:A65536").Find(Target, LookIn:=xlValues)
If Not f Is Nothing Then
f.Select
End If
End If
End Sub

enter something to look for in A1 and it will select the first value
in column A after A1
It has issues though...
if you enter 1 in A1 and press enter, it will select the first cell in
Column A with a 1 in it.

Maybe you are thinking of an auto fill, like with a ComboBox ? if so
maybe supply some more info...
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top