+ Reply to Thread
Results 1 to 3 of 3

Automatically sort cells in one sheet based on values in another

  1. #1
    Registered User
    Join Date
    12-17-2009
    Location
    canada
    MS-Off Ver
    Excel 2007
    Posts
    31

    Automatically sort cells in one sheet based on values in another

    Hi,

    I am using excel 2013. I have a macro enabled spreadsheet. I have in sheet 1(Picks) - a list of names (columns) and list of teams (rows). For each team win, I add a 'Win' in one column and it automatically (formula used) calculates the points for each of the names. I then link all these names & points to sheet 2 (Ranking Sorted) using as an eg. "=SUM(Picks!V4)" to get the value from 'Picks' - sheet 1.

    what I want to do is to automatically sort the columns in "ranking Sorted' - sheet 2. I have three columns in this sheet - "Name, Points, Rankings". I have 28 rows including the header. I wish to sort by 'Rankings', whenever there is a change in any value in sheet 1 (Picks).

    thanks,

  2. #2
    Registered User
    Join Date
    03-08-2016
    Location
    USA
    MS-Off Ver
    2007
    Posts
    22

    Re: Automatically sort cells in one sheet based on values in another

    If i get you right rankings is a Number ? If thats the case then you just go to the Data Tab and click on sorting, this should do the deal if they are just numbers. Try this makro hopefully its working. I'm still not the best in excel.

    Sorting_sheet
    On Error Resume Next
    Range("A1").Sort Key1:=Range("A2"), _
    Order1:=xlAscending, Header:=xlYes, _
    OrderCustom:=1, MatchCase:=False, _
    Orientation:=xlTopToBottom
    End Sub

  3. #3
    Registered User
    Join Date
    12-17-2009
    Location
    canada
    MS-Off Ver
    Excel 2007
    Posts
    31

    Re: Automatically sort cells in one sheet based on values in another

    Thanks Joel. I tried it but it does not seem to work. After entering the macro, is there anything else I need to do in the visual basic window ... do I have to run it or do something to trigger it?

    The rankings is a number that I have linked from a cell in another sheet.

    The manual sorting ie. going to the data tab / sort works fine - I am hoping though to have it sorted automatically.

    Thanks again.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Replies: 3
    Last Post: 10-28-2015, 06:16 AM
  2. Automatically Change Sheet Names Based On Cell Values - merged cells
    By Elizabethz in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 09-24-2014, 11:35 AM
  3. How to lookup and sort rows based on the values in cells
    By sudharshan86 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 05-26-2014, 09:12 AM
  4. [SOLVED] Auto Sort a sheet based on values in a locked cell
    By armstrob in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 12-17-2013, 08:19 AM
  5. Sort based on another sheet values
    By naflas in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-14-2011, 04:32 AM
  6. Sort based on values of cells to the left
    By okriskao in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 04-13-2009, 08:49 AM
  7. Sort Sheet based on Changing Values
    By cdogstu99 in forum Excel General
    Replies: 1
    Last Post: 02-19-2008, 04:02 PM

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