+ Reply to Thread
Results 1 to 10 of 10

First Thread - Sorting and cell references

  1. #1
    Registered User
    Join Date
    01-29-2018
    Location
    Lincoln, England
    MS-Off Ver
    2016
    Posts
    6

    First Thread - Sorting and cell references

    Hi all,

    Brand new here!
    I'm pretty much self-taught with excel so my formulae and methods are probably a little bizarre. I make spreadsheets for football (soccer) stats and I love improving and adding to them. I make graphics with the data I create for blogs I write for.

    I have a sheet that totals up all the data for each player that calculates from the other sheets that collect the data for each category.
    I also have another sheet that automatically (in theory) creates the graphics. The problem I have is that I have to resort the players page every time I create a graphic for each category so the players are listed in order. But I have to remember to reorder it each category otherwise the data is in the wrong order. Is there any way I can automate this process to save time and avoid mistakes? Ideally I'd like to be able to map the formulae in the graphics table to the specific player's row in the players sheet.

    Sorry if I'm being unclear, please let me know if you need any further info/clarification.

    Thanks,
    Tom

  2. #2
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,054

    Re: First Thread - Sorting and cell references

    Too many words and not enough detail!!!

    Will you please attach a SMALL sample Excel workbook (10-20 rows of data is usually enough)? Please don't attach a picture of one (no-one will want to re-type all your stuff before starting).

    1. Make sure that your sample data are truly REPRESENTATIVE of your real data. The use of unrepresentative data is very frustrating and can lead to long delays in reaching a solution.

    2. Make sure that your desired solution is also shown (mock up the results manually).

    3. Make sure that all confidential information is removed first!!

    4. Try to avoid using merged cells. They cause lots of problems!

    Unfortunately the attachment icon doesn't work at the moment. So, to attach an Excel file you have to do the following: Just before posting, scroll down to Go Advanced and then scroll down to Manage Attachments. Now follow the instructions at the top of that screen.
    Glenn




    None of us get paid for helping you... we do this for fun. So DON'T FORGET to say "Thank You" to all who have freely given some of their time to help YOU.

    Temporary addition of accented to illustrate ongoing problem to the TT: L? fh?ile P?draig sona dhaoibh

  3. #3
    Registered User
    Join Date
    01-29-2018
    Location
    Lincoln, England
    MS-Off Ver
    2016
    Posts
    6

    Re: First Thread - Sorting and cell references

    Here's a quick example
    Attached Files Attached Files

  4. #4
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,054

    Re: First Thread - Sorting and cell references

    For example (for assists),in G4 copied down, an array formula:

    =IFERROR(INDEX(Players!$A$2:$A$15,MATCH(0,IF(Players!$D$2:$D$15=H4,COUNTIF(G$3:G3,Players!$A$2:$A$15)),),),"")

    and in H4, an ordinary formula:

    =LARGE(Players!$D$2:$D$15,ROWS(H$4:H4))

    similarly for minutes and goals, as in the attached sheet.

    Array Formulae are a little different from ordinary formulae in that they MUST be confirmed in the FIRST CELL ONLY by pressing CTRL+SHIFT+ENTER to activate the array, not just ENTER. After that, the array can be dragged down as normal, to cover the desired range.

    You will know the array is active when you see curly brackets { } - or "curly braces" for those of you in the USA, or "flower brackets" for those of you in India - appear around the outside of your formula. If you do not use CTRL+SHIFT+ENTER you will (almost always) get an error message or an incorrect answer. Press F2 on that cell and try again.

    Don't type the curly brackets yourself - it won't work...
    Attached Files Attached Files

  5. #5
    Registered User
    Join Date
    01-29-2018
    Location
    Lincoln, England
    MS-Off Ver
    2016
    Posts
    6

    Re: First Thread - Sorting and cell references

    Hi,

    Thanks for the response. It's working on most of the calculations but for one, the right hand column with totals is correct, but the left hand one with names is not including all players and just repeating some. How can I fix this?

    Cheers

  6. #6
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 2019
    Posts
    17,567

    Re: First Thread - Sorting and cell references

    I compared the manually input results from the "Desired" sheet in the file attached to post #3 to the results yielded by Richard's formulae and they match exactly.
    Therefore it would be helpful if you could upload a sample illustrating the scenario(s) in which players are not included or repeated.
    Let us know if you have any questions.
    Consider taking the time to add to the reputation of everybody that has taken the time to respond to your query.

  7. #7
    Registered User
    Join Date
    01-29-2018
    Location
    Lincoln, England
    MS-Off Ver
    2016
    Posts
    6

    Re: First Thread - Sorting and cell references

    Thanks again. The formula works great for goals and assists as I just copied it over. It's probably my failure to adjust it to the different stat, I've never used this type before! I've attached a copy with just the raw numbers with names removed. It shows on the 2nd sheet that the Goals and Assists is working, just not the Yellows and Reds.
    Attached Files Attached Files

  8. #8
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 2019
    Posts
    17,567

    Re: First Thread - Sorting and cell references

    The issue is the COUNTIF in J4 is starting with J2 instead of J3. The formula should read:
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    Same issue is occurring in M4.
    Let us know if you have any questions.

  9. #9
    Registered User
    Join Date
    01-29-2018
    Location
    Lincoln, England
    MS-Off Ver
    2016
    Posts
    6

    Re: First Thread - Sorting and cell references

    Thanks, got that working now!

  10. #10
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 2019
    Posts
    17,567

    Re: First Thread - Sorting and cell references

    You're Welcome and thank you for the feedback. Please take a moment to mark the thread as 'Solved' using the thread tools link above your first post. I hope that you have a blessed day.

+ 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. Sorting with Cell References
    By tangerinezebra in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 02-04-2016, 11:40 AM
  2. Sorting Table with Cell References
    By Statto in forum Excel General
    Replies: 5
    Last Post: 12-23-2014, 12:32 PM
  3. Sorting messes up cell references
    By Alpha Hunter in forum Excel General
    Replies: 2
    Last Post: 12-28-2010, 04:15 PM
  4. Replies: 3
    Last Post: 12-22-2010, 01:52 PM
  5. List sorting problem with external cell references
    By bobschwenkler in forum Excel Charting & Pivots
    Replies: 4
    Last Post: 11-07-2008, 03:39 PM
  6. Sorting Changes Cell References
    By Camp2 in forum Excel General
    Replies: 2
    Last Post: 06-20-2008, 03:41 PM
  7. cell references lost after sorting
    By gert.everaert in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 07-17-2007, 02:13 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