Auto Sorting By Date

acceptedpanda

New Member
Joined
Apr 14, 2015
Messages
2
Greetings,

I'm at the end of my rope trying to create an auto sorting excel spreadsheet. I am using Excel 2013.

My active cells on the spreadsheet are A1-L126.

My Headers are:
A1-L1
A22-L22
A43-L43
A64-L64
A85-L85
A106-L106

I need cells A1-L21 to sort independently,
A22-L42 to sort independently, A43-L63 and so on for the rest of the sheet. I need all of the rows to sort by my E column which are all my dates.

I hope someone can help!
 

Excel Facts

Does the VLOOKUP table have to be sorted?
No! when you are using an exact match, the VLOOKUP table can be in any order. Best-selling items at the top is actually the best.
Greetings,

I'm at the end of my rope trying to create an auto sorting excel spreadsheet. I am using Excel 2013.

My active cells on the spreadsheet are A1-L126.

My Headers are:
A1-L1
A22-L22
A43-L43
A64-L64
A85-L85
A106-L106

I need cells A1-L21 to sort independently,
A22-L42 to sort independently, A43-L63 and so on for the rest of the sheet. I need all of the rows to sort by my E column which are all my dates.

I hope someone can help!

Ended up figuring it out with this:

Private Sub Worksheet_Change(ByVal Target As Range)
On Error Resume Next
Range("A1:L21").Sort Key1:=Range("E1"), _
Order1:=xlAscending, Header:=xlYes, _
OrderCustom:=1, MatchCase:=False, _
Orientation:=xlTopToBottom
Range("A22:L42").Sort Key1:=Range("E1"), _
Order1:=xlAscending, Header:=xlYes, _
OrderCustom:=1, MatchCase:=False, _
Orientation:=xlTopToBottom
Range("A43:L63").Sort Key1:=Range("E1"), _
Order1:=xlAscending, Header:=xlYes, _
OrderCustom:=1, MatchCase:=False, _
Orientation:=xlTopToBottom
Range("A64:L84").Sort Key1:=Range("E1"), _
Order1:=xlAscending, Header:=xlYes, _
OrderCustom:=1, MatchCase:=False, _
Orientation:=xlTopToBottom
Range("A85:L105").Sort Key1:=Range("E1"), _
Order1:=xlAscending, Header:=xlYes, _
OrderCustom:=1, MatchCase:=False, _
Orientation:=xlTopToBottom
Range("A106:L126").Sort Key1:=Range("E1"), _
Order1:=xlAscending, Header:=xlYes, _
OrderCustom:=1, MatchCase:=False, _
Orientation:=xlTopToBottom
End Sub
 
Upvote 0

Forum statistics

Threads
1,214,411
Messages
6,119,346
Members
448,888
Latest member
Arle8907

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top