Sorting columns in Tables

Davidns

Board Regular
Joined
May 20, 2011
Messages
159
Office Version
  1. 365
Platform
  1. MacOS
When creating a table, Excel turns every column in the table into a sortable column via a drop down arrow next to the column name. Is it possible to turn off this sorting ability for some of the columns in a table?
 

Excel Facts

Why are there 1,048,576 rows in Excel?
The Excel team increased the size of the grid in 2007. There are 2^20 rows and 2^14 columns for a total of 17 billion cells.
That's good to know. But is there a way to do it for a particular column?
 
Upvote 0
It's possible to hide the filter button on individual columns.
Which columns are you interested in?
 
Upvote 0
Just a general question. How can the filter be turned off for a particular column?
 
Upvote 0
If you have multiple columns like
Code:
Sub Davidns()
   Dim Ary As Variant
   Dim i As Long
   Ary = Array(1, 3, 5, 7)
   With Sheet1.ListObjects("Table2")
      For i = 0 To UBound(Ary)
         .HeaderRowRange.AutoFilter Ary(i), , , , False
      Next i
   End With
End Sub
 
Upvote 0
Or if it's just the one column, like
Code:
Sub Davidns()
  Sheet1.ListObjects("Table2").HeaderRowRange.AutoFilter 5, , , , False
End Sub
 
Upvote 0

Forum statistics

Threads
1,223,532
Messages
6,172,878
Members
452,486
Latest member
standw01

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