Using auto sort function.

C

clayton

Hi, I am using
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Column = 1 Then
Target.CurrentRegion.Sort Me.Range("A1"), header:=xlGuess
End If
End Sub
so my data will be auto sorted when adding a new vendor. This is fine
except that when I type in the vendors name it jumps up to where it
should be alphabetically leaving me at the bottom of the list.
I need it to also move the focus up to the same spot so I can continue
to add more data for that vendor.
If this in not possible then I would like to know how to add the above
function to a button so when I am finished adding the new vendor and
all its fields I can click the button to do a sort.
 

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

Top