Results 1 to 3 of 3

VBA Auto Sort Table When Change Made to Column A by values in Column T

Threaded View

  1. #1
    Registered User
    Join Date
    05-30-2018
    Location
    California, US
    MS-Off Ver
    2016
    Posts
    2

    VBA Auto Sort Table When Change Made to Column A by values in Column T

    Hello,

    I have a table where the values inputted in column A effect column T. I tried to write a Macro that sorts the table by column T when values in column A are changed. The macro doesn't work. How can I fix the macro?

    This is what I wrote.
    Private Sub Worksheet_Change(ByVal Target As Range)
        On Error Resume Next
        If Not Intersect(Target, Range("A7:A33")) Is Nothing Then
            Range("A7:T33").Sort Key1:=Range("T7"), _
              Order1:=xlDescending, Header:=xlNo, _
              OrderCustom:=1, MatchCase:=False, _
              Orientation:=xlTopToBottom
        End If
    End Sub
    Last edited by Leith Ross; 05-30-2018 at 10:43 PM. Reason: Added Code Tags

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Auto sort columns when a change is made
    By Nemery in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-29-2017, 06:39 AM
  2. Replies: 5
    Last Post: 02-18-2016, 12:51 PM
  3. Replies: 9
    Last Post: 09-22-2015, 12:51 AM
  4. detecting duplicate values in a column (values are made of formula)
    By louiemangaring in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 08-12-2015, 06:25 AM
  5. Incrementing Column's value +1 each time a change is made in another worksheet
    By SuGo in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-05-2013, 12:16 PM
  6. Replies: 0
    Last Post: 11-11-2011, 04:10 PM
  7. Replies: 0
    Last Post: 11-19-2009, 11:48 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1