E
EmzOLV
Hey everyone!
I am sure someone can help me on here. I found an amazing post on thi
website which really helped me with getting something to work wit
automatically alphabeticising a column, but something went wrong wit
the previous file - it corrupted during a migration - and now it won'
work.
I'm trying to do the same thing again, but cannot find the post and
swear I have gone through hundreds of posts on this website and the cod
that I have tried each and every time isn't the same one I found before
Here is what I would like to do:
* Alphabeticize column A on Excel, starting from A5 onwards
* When it sorts, it must keep the information on that row from columns
- G (so when say, row 10 moves up to row 8, it doesn't just move colum
A, it also moves columns B-G with it so the information is relevant).
* It automatically does this once something is entered into column A
and either enter is hit or another box is selected
I understand that once something is entered in column A and the data i
sorted, it usually gets lost in the remainder of the spreadsheet bu
this was something we worked with in the past.
Also, please note that Column A (and up to G, with the exception of tw
columns) are all text based, not numeric. Not sure if this makes
difference.
Any help is much appreciated. Currently running on Office 2010. And thi
was the code I kept finding, but no matter how I amend it, it ALWAY
takes the first 4 rows instead of starting alphabetically from th
fifth. Maybe someone could assist and let me know where I'm going wrong
so I can learn it instead of just being told?
Private Sub Worksheet_Change(ByVal Target As Range)
If Intersect(Target, Columns("A:A")) Is Nothing Then
Else
Application.EnableEvents = False
Columns("A:Z").Select
Selection.Sort Key1:=Range("A5"), Order1:=xlAscending, Header:=xlGuess
_
OrderCustom:=5, MatchCase:=False, Orientation:=xlTopToBottom, _
DataOption1:=xlSortNormal
Application.EnableEvents = True
End If
End Su
I am sure someone can help me on here. I found an amazing post on thi
website which really helped me with getting something to work wit
automatically alphabeticising a column, but something went wrong wit
the previous file - it corrupted during a migration - and now it won'
work.
I'm trying to do the same thing again, but cannot find the post and
swear I have gone through hundreds of posts on this website and the cod
that I have tried each and every time isn't the same one I found before
Here is what I would like to do:
* Alphabeticize column A on Excel, starting from A5 onwards
* When it sorts, it must keep the information on that row from columns
- G (so when say, row 10 moves up to row 8, it doesn't just move colum
A, it also moves columns B-G with it so the information is relevant).
* It automatically does this once something is entered into column A
and either enter is hit or another box is selected
I understand that once something is entered in column A and the data i
sorted, it usually gets lost in the remainder of the spreadsheet bu
this was something we worked with in the past.
Also, please note that Column A (and up to G, with the exception of tw
columns) are all text based, not numeric. Not sure if this makes
difference.
Any help is much appreciated. Currently running on Office 2010. And thi
was the code I kept finding, but no matter how I amend it, it ALWAY
takes the first 4 rows instead of starting alphabetically from th
fifth. Maybe someone could assist and let me know where I'm going wrong
so I can learn it instead of just being told?
Private Sub Worksheet_Change(ByVal Target As Range)
If Intersect(Target, Columns("A:A")) Is Nothing Then
Else
Application.EnableEvents = False
Columns("A:Z").Select
Selection.Sort Key1:=Range("A5"), Order1:=xlAscending, Header:=xlGuess
_
OrderCustom:=5, MatchCase:=False, Orientation:=xlTopToBottom, _
DataOption1:=xlSortNormal
Application.EnableEvents = True
End If
End Su