Sorting columns in Tables

Davidns

Board Regular
Joined
May 20, 2011
Messages
143
Office Version
  1. 365
Platform
  1. Windows
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

How can you turn a range sideways?
Copy the range. Select a blank cell. Right-click, Paste Special, then choose Transpose.
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,216,073
Messages
6,128,641
Members
449,461
Latest member
kokoanutt

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