Results 1 to 4 of 4

Thread: automatically sort

  1. #1
    Neophyte Jadre's Avatar
    Join Date
    Mar 2014
    Location
    Manitoba, Canada
    Posts
    3
    Articles
    0

    automatically sort



    Register for a FREE account, and/
    or Log in to avoid these ads!

    i am trying to automatically sort values when a cell in the range A1:A10 changes

    the range is A1:A10 how do u make it sort automatically when a cell changes in that range using a macro or formula

  2. #2
    Acolyte Sixthsense's Avatar
    Join Date
    Nov 2012
    Location
    India
    Posts
    26
    Articles
    0
    Copy the below code and do right click on sheet tab and select view code and paste it. Close the VBA window (Alt+Q to close VBA window) and return to that sheet and check.

    Code:
    Private Sub Worksheet_Change(ByVal Target As Range)
    
    If Not Intersect(Target, Range("A1:A10")) Is Nothing Then
        Application.ScreenUpdating = False
            Range("A1:A10").Sort Key1:=Range("A1"), Order1:=xlAscending, Header:=xlNo
        Application.ScreenUpdating = True
    End If
    
    End Sub

  3. #3
    Neophyte Jadre's Avatar
    Join Date
    Mar 2014
    Location
    Manitoba, Canada
    Posts
    3
    Articles
    0
    i tried your macro and it sorts them but not automatically do u know a macro to sort them auto?

  4. #4
    Acolyte Sixthsense's Avatar
    Join Date
    Nov 2012
    Location
    India
    Posts
    26
    Articles
    0
    Please show it in excel with the suggested code

Tags for this Thread

Posting Permissions

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