+ Reply to Thread
Results 1 to 8 of 8

Rank If

  1. #1
    Registered User
    Join Date
    09-28-2010
    Location
    Texas
    MS-Off Ver
    Excel 2016
    Posts
    6

    Rank If

    I am trying to rank all positions on football teams across all sheets in the workbook. Each sheet is a team, and I would like to look at each team and see where that respective team's players rank for each position. I have attached a sample file. There are three sheets. My original file has over 120 sheets.

    I would like to have the rank in A49:A119, based off the value in T49:T119 for each position, ie QB, RB, WR, TE and so on.

    For the QB position in the file below, QB Donald Miller in the Marist Sheet should rank 1st, QB Earl Simmons in the TX Southern Sheet would be 2nd, and QB Kenneth Williams in the Texas State sheet would be 3rd and so on. I would like to have this for each position. Can someone help me please? This has been driving me crazy. I was told that it needed to be vba, but I am not good that familiar with vba.

    Thanks a million,
    phimutau
    Attached Files Attached Files

  2. #2
    Forum Guru karedog's Avatar
    Join Date
    10-03-2014
    Location
    Indonesia
    MS-Off Ver
    2003
    Posts
    2,971

    Re: Rank If

    Maybe :
    Please Login or Register  to view this content.
    1. I care dog
    2. I am a loop maniac
    3. Forum rules link : Click here
    3.33. Don't forget to mark the thread as solved, this is important

  3. #3
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,330

    Re: Rank If

    Hi phimutau,

    What number should we look at to do the ranking? Is it the Tot in Column R? We need to know which number is used to even start to work on this problem. Or is it column AP that you are using for the ranking?
    One test is worth a thousand opinions.
    Click the * Add Reputation below to say thanks.

  4. #4
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,330

    Re: Rank If

    Hi phimutau

    I can do this problem but as you guessed it isn't an easy one.

    If you could get all 120 (3 in your example) teams on a single sheet with Name, Position, ST (points?) you could then do a Pivot Table and Rank them easily. I've done the Pivot Table on Sheet 4). This Pivot Table is the easy part. Getting all players on the same sheet takes a tool build into 2016 called Get & Transform. I used it to do a connection to your 3 sheets. I also cleaned up the data by removing the unneeded top rows and all other rows that didn't have Name, Position and ST. I did this to all 3 sheets, that is the Power Query filter. Then I created an Append Query (using G&T (also known as Power Query)) and appended all 3 sheets into a single table.

    Lets call the below a "proof of concept". Your problem can be done using Pivot Tables and Appending all sheets together into a single sheet.

    Rank Football Positions Answer.xlsx

    Keep this thread alive by asking more or learn from my example.

  5. #5
    Forum Guru karedog's Avatar
    Join Date
    10-03-2014
    Location
    Indonesia
    MS-Off Ver
    2003
    Posts
    2,971

    Re: Rank If

    Marvin, I believe it is :

    Quote Originally Posted by phimutau View Post
    I would like to have the rank in A49:A119, based off the value in T49:T119 for each position, ie QB, RB, WR, TE and so on.

    phimutau, after reading again your requirements :
    Quote Originally Posted by phimutau View Post
    For the QB position in the file below, QB Donald Miller in the Marist Sheet should rank 1st, QB Earl Simmons in the TX Southern Sheet would be 2nd, and QB Kenneth Williams in the Texas State sheet would be 3rd and so on.
    I think you want to join the data on all sheets, then rank based on this joined data. In that case, use this code instead :
    Please Login or Register  to view this content.

  6. #6
    Registered User
    Join Date
    09-28-2010
    Location
    Texas
    MS-Off Ver
    Excel 2016
    Posts
    6

    Re: Rank If

    I have to go to work and haven't had a chance to look at these, but I appreciate the help. I will check them out when I get a chance today and reply once I do.

    I play in a college football simulation game. To clear up any confusion, I want to click on each sheet (aka team) when I face this team in a game, and then be able to see where each of their 50 players rank among all players. My plan is to attack the weakest players on his defense. For instance, if I face Marist, I want to click on the Marist sheet and look at his DBs and see the rank of each of them in column A next to the DBs, and the same for the LBs. I will then set up my offense to go after his weakest players.

  7. #7
    Registered User
    Join Date
    09-28-2010
    Location
    Texas
    MS-Off Ver
    Excel 2016
    Posts
    6

    Re: Rank If

    Thank y'all so much for your efforts. Karedog, your vba worked perfect. I just went in an added all sheets to the x=array. I can now see the ranks of all players based on their positions. Thanks again, y'all have really made me day.

  8. #8
    Forum Guru karedog's Avatar
    Join Date
    10-03-2014
    Location
    Indonesia
    MS-Off Ver
    2003
    Posts
    2,971

    Re: Rank If

    You are welcome.

    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED. Thanks.

+ 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: 2
    Last Post: 04-27-2015, 08:50 AM
  2. Rank Teams in Performance Order - not as easy as just =Rank...
    By excelnat in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 02-06-2015, 12:12 PM
  3. Replies: 8
    Last Post: 02-20-2014, 07:03 PM
  4. Replies: 6
    Last Post: 11-30-2013, 09:14 AM
  5. Replies: 1
    Last Post: 11-30-2013, 06:48 AM
  6. Formula to Rank and populate values base don Rank
    By Excel Dumbo in forum Excel General
    Replies: 3
    Last Post: 10-09-2012, 02:02 AM
  7. Replies: 1
    Last Post: 08-15-2005, 05:05 PM

Tags for this Thread

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