AutoSort col when Cell value changes

NateD1

New Member
Joined
Apr 1, 2020
Messages
46
Office Version
  1. 365
Platform
  1. Windows
Hello All

In need of some help, i have a table which i would like it to auto sort if a cell value changes.

Header of table is Row: A12:Q12. within this table i would like to sort only header AL12.
cell A3 is the reference cell which will change. If Cell A3 changes value, AL12 to sort table col in Ascending order.
Thank :)
 

Excel Facts

Can Excel fill bagel flavors?
You can teach Excel a new custom list. Type the list in cells, File, Options, Advanced, Edit Custom Lists, Import, OK
How is A3 being changed?
Also is your table a structured table & if so what is it's name?
 
Upvote 0
its linked to a pivot which will display Text&Date when using slicers, and not a structured table sorry.
 
Upvote 0
As I no nothing about pivots, unfortunately I cannot help.
 
Upvote 0
its linked to a pivot which will display Text&Date when using slicers, and not a structured table sorry.

As I no nothing about pivots, unfortunately I cannot help.
essentially its just a data set with Filters, and the data is just pulled from the pivots (so pivots dont impact anything). when i change my selection i just need col AL to sort Ascending. if A3 changes. thanks
 
Upvote 0
How is A3 being changed?
 
Upvote 0
How is A3 being changed
its changed automatically when i select from a dropdown to choose a different date period for my data. in Cell A3 its just ="DATE"&""&"TIME"
 
Upvote 0
Is it a formula or data validation ?
 
Upvote 0
Ok, how about
VBA Code:
Private Sub Worksheet_Calculate()
   Range("A12:Q" & Range("A" & Rows.Count).End(xlUp).Row).Sort key1:=Range("A12"), order1:=xlAscending, Header:=xlYes
End Sub
This will trigger whenever any cell recalculates.
I have also assumed it should sort on col A as col AL is not in the data range
 
Upvote 0

Forum statistics

Threads
1,214,590
Messages
6,120,421
Members
448,961
Latest member
nzskater

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