AutoSort col when Cell value changes

NateD1

New Member
Joined
Apr 1, 2020
Messages
35
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 :)
 

Some videos you may like

Excel Facts

Best way to learn Power Query?
Read M is for (Data) Monkey book by Ken Puls and Miguel Escobar. It is the complete guide to Power Query.

Fluff

MrExcel MVP, Moderator
Joined
Jun 12, 2014
Messages
55,344
Office Version
  1. 365
Platform
  1. Windows
How is A3 being changed?
Also is your table a structured table & if so what is it's name?
 

NateD1

New Member
Joined
Apr 1, 2020
Messages
35
Office Version
  1. 365
Platform
  1. Windows
its linked to a pivot which will display Text&Date when using slicers, and not a structured table sorry.
 

Fluff

MrExcel MVP, Moderator
Joined
Jun 12, 2014
Messages
55,344
Office Version
  1. 365
Platform
  1. Windows
As I no nothing about pivots, unfortunately I cannot help.
 

NateD1

New Member
Joined
Apr 1, 2020
Messages
35
Office Version
  1. 365
Platform
  1. Windows

ADVERTISEMENT

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
 

Fluff

MrExcel MVP, Moderator
Joined
Jun 12, 2014
Messages
55,344
Office Version
  1. 365
Platform
  1. Windows
How is A3 being changed?
 

NateD1

New Member
Joined
Apr 1, 2020
Messages
35
Office Version
  1. 365
Platform
  1. Windows

ADVERTISEMENT

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"
 

Fluff

MrExcel MVP, Moderator
Joined
Jun 12, 2014
Messages
55,344
Office Version
  1. 365
Platform
  1. Windows
Is it a formula or data validation ?
 

Fluff

MrExcel MVP, Moderator
Joined
Jun 12, 2014
Messages
55,344
Office Version
  1. 365
Platform
  1. Windows
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
 

Watch MrExcel Video

Forum statistics

Threads
1,127,164
Messages
5,623,109
Members
415,955
Latest member
ssheldon2021

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
Top