Logo 
Search:

MS Office Forum

Ask Question   UnAnswered
Home » Forum » MS Office       RSS Feeds

Automatically sort column A

  Asked By: Everett    Date: Aug 28    Category: MS Office    Views: 647
  

I have a workbook with several sheets. These books contain various
macros ans some VBA. When I activate a certain routine it copies
certain cells (part numbers) into column A into the next free cell on
another worksheet in the same workbook. What I would like to do ( and
I did once have a lovely routine to do this but now cannnot find it
and for the life of me, however I twiddle with VBA I cannot get it
working), is automatically sort this column A list. I know it needs a
change by val command but please help

Share: 

 

1 Answer Found

 
Answer #1    Answered By: Volker Fischer     Answered On: Aug 28

It could be somethin in the worksheet  code like

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Selection.Sort Key1:=Range("A1"), Order1:=xlAscending, Header:=xlGuess, _
OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom, _
DataOption1:=xlSortNormal
End Sub

 
Didn't find what you were looking for? Find more on Automatically sort column A Or get search suggestion and latest updates.




Tagged: