In Excel, how can i break ties when ranking students' tests? - excel

I'm doing like a bit of a competition for my students in which they have a weekly test they have to complete and submit. The grade is stored in an excel column next to their names.
Following instructions i found, i was able to create a full working general TOP3 with the Average of the tests' grade and when i get to the TOP5 for the grades of the last submitted test, i get a three-way tie.
I use the LARGE function to find the top grades and the combination of the INDEX and MATCH functions to find and display the name associated to that mark.
(Something like this =INDEX($A$1:$A$29;MATCH(M12;$F$1:$F$29;0))
The problem is that the function compares the grade on it's left to find that value in the range of grades and then returns the corresponding name associated to that row; so, it returns the same name for the three grades.
I tried using an IF function to exclude the first-result-cell from the array in which the formula is looking so that when it finds a match it will be different from the previous one, but i have not manage to work it out...

You need to use a pivot table and filter the results to the top 3. A pivot table will display the ties.

Here is a link that #Jeeped gave which basically solves the problem!
Thank you all for commenting!
Multiple Ranked Returns from INDEX(…) with Duplicate Values:
http://tinyurl.com/naavhgf

Related

Excel: Calculations with two variables, that both share the same ID

I have been working on a little project in which I analyze some data from a game that I play. My dataset looks like this:
As you can see, it consists of:
Match ID
Map the match was played on
Team name
First pick, second pick and third pick (characters/players)
Points the teams won from this match
What side they played on (A or B)
Who won
Whether they're in the top 64 teams
Currently I am trying to analyze how certain picks perform against other picks. For example, I would like to see how the Xelor first pick (cell D2) performs against all other first picks. To do this, I would need to count the amount of times the Xelor first pick played against all other first pick, and how many times the Xelor pick won. I don't have any problems doing that, but the catch is that I need to make sure I only compare the Xelor first picks with other first picks from the same match (same match ID). For example, I would compare the Xelor first pick (D2) vs the Steamer first pick (D3), as they share the same match ID.
I came up with a messy solution earlier with simple formulas, but it made for a table that had no data every other row, which resulted in some problems analyzing the data. I am now struggling with the Index and Match functions to make a pretty table for my needs, but I am having a hard time.
If anyone could give me a hand on how to do this, or has any clever ideas on how to analyze all picks vs other picks, let me know!
So, it turns out that both the Unique function and the Xlookup functions made this an easy problem to solve.
First, I made a new column showing just the unique match ID values:
=UNIQUE(A:A)
Then, next to that column I looked up the first pick of the A side team using Xlookup:
=XLOOKUP(M2;A:A;C:C;;0;1)
I then did the same in another column for the team on the other side using an inverse search direction:
=XLOOKUP(M2;A:A;C:C;;0;-1)
Lastly, to see which of the two first picks won, I used this formula in a fourth column:
=IF(XLOOKUP(M2;A:A;H:H;;0;1)="Win";N2;O2)
This resulted in the following table (M:P):
Thanks for the help, David!
You could try something like this in M2 cell:
=IF(L2="","",COUNTIFS(TB_GAMES[W/L/D],"Win",
TB_GAMES[Pick 1],L2,TB_GAMES[Match],$K$2))
Then you can expand the formula down.
In L column you have the unique values from users given the Match (K2) and the Pick 1 column values.
=UNIQUE(FILTER(TB_GAMES[Pick 1], TB_GAMES[Match]=K2))
Update
In case you want to calculate the scores for all the Pick 1 players at once. You can try the following:
=LET(winSet, FILTER(TB_GAMES[Pick 1], TB_GAMES[W/L/D]="Win"),
matches,XMATCH(winSet, UNIQUE(winSet)),
freq,FREQUENCY(matches, UNIQUE(matches)), SORT(HSTACK(UNIQUE(winSet),
FILTER(freq, freq<>0)),2,-1)
)
Note: Because we are using a FILTER function we cannot use as range input argument for COUNTIF or COUNTFS, so we try to use XMATCH/FREQUENCY as a way to achieve the same result. For more information about this see my answer to the question: How to count the number of trades made on a Excel spreadsheet using a custom conditional formula?, we use here the same idea and the explanation would be the same.
The HSTACK function is used just to combine the result having the winners and the number of wins for each player. Finally the result is sorted by score.
This would be the result on O2 cell:

Return Column Index for Each Matching Value in a Row?

Excel Novice using Excel for Business (Online) here.
I am having a difficult time wrapping my head around a way to write a function that does three things for me.
Check a specific row of data in a large table, preferably matching ID's between the two tables (I've been using XLOOKUP to ensure that results are keyed to a specific ID)
Find and return the Column index for every cell within the row with the string "Yes"
SUM associated points tied to the column indexes.
I am creating a new QA Scoring system, and all of the questions share the potential for "Yes" and "No" but depending on the question the number of points will be different. I have been approaching this with the idea that I could return the column indexes, convert them to the points associated to the column indexes, and then SUM them for a score, but I am open to different ideas.
Click Here for a Demo of what I am trying to do, included is the actual data set I was using.
Possible Points
=SUMIFS($O$2:$AH$2,INDEX(Raw_Data!D:W,MATCH(Scoring!A4,Raw_Data!A:A,0),0),"*")
Points Earned
=SUMIFS($O$2:$AH$2,INDEX(Raw_Data!D:W,MATCH(Scoring!A4,Raw_Data!A:A,0),0),"Yes")
These will work with your present setup, but in the long run it would probably be best to just add Possible Points and Points Earned columns to your Table3, if possible.

How do I recieve the number of cells based off of three columns in Excel?

I'm not too sure how to word this problem so, I apologize for the vagueness. Here is what I am trying to do though:
I have a large Excel table with a ton of values, I however, only care about 3 columns. The three columns I have are "Project Name", "Active/Planned", and "Week of Month". Here is an example of some values I would have:
Project Name
Active/Planned
Week of Month
StoreProj
Active
2021-07 Jul-Wk1
SecProj
Planned
2021-07 Jul-Wk2
StoreProj
Active
2021-07 Jul-Wk1
Now, I have used a formula to get the number of projects based on a specific week month and avoiding duplicate values for the project name. The code I used returns an integer of the number of projects. Here is what I used:
=IFERROR(ROWS(UNIQUE(FILTER(Table[Project Name],Table[Week of Month]=2021-07 Jul-Wk1))), 0)
This works as intended. Now the issue I am running into is that I need to filter through these rows as I did previously, but now I need to include the "Active/Planned" column. So, I want to be able to see how many projects I have based off of the week of the month and return a number of projects (excluding duplicate names), but be able to filter through that integer output based off of the active/planned projects. So in a perfect scenario I can choose the week of month and if the project is "Active" or "Planned" and see the amount of projects I have.
This might be an easy fix so I apologize, I am just stumped, any help would be greatly appreciated. Thanks!
Work through that step by step, you've got the FILTER function which is giving data to the UNIQUE function, to the ROWS function, and then your IFERROR. However, the data about whether each line/row is 'Active' or 'planned' isn't passed out beyond the FILTER function, so can't be used by anything further on in the above sequence.
Boring theoretical advice out the way, try this;
=COUNT(IF(UNIQUE(FILTER( Table[[Project Name]:[Active/Planned]], Table[Week of Month] = "2021-07 Jul-wk1"))= "Active", 1))
Explanation:
FILTER(...) outputs records with the relevant date filter, however it outputs Table[[Project Name]:[Active/Planned]] - both columns, to ensure all relevant data is there.
UNIQUE(...) Then narrows that down to unique values, although by this stage I'm not 100% sure you need this.
IF(... = "Active", 1) then replaces the 'Active' outputs with 1s
COUNT() returns the number of cells in the above that contain a number (the 1s from the IF())
Yes, you can't use COUNTIF on arrays (and all except that last bullet point above are outputting arrays not single values) - and no, I didn't know that before attempting to answer this question, found it over at a different question!

Index with double Match returns incorrect closest values

I have an planning exported to Excel which looks like the following (tab ' Data'):
Each production line has a number of people working on it. Now is my goal to show how many people are working on a line per minute. We plan per product group, and several product groups combined form waht a line has to do per minute.
To get the production per minute I created the following (tab 'Conversie'):
=INDEX(Data!$H$2:$H$157;MATCH($N$1&A4;Data!$B$2:$B$157&Data!$C$2:$C$157;1))
In the example it works correct. However, the formula doesn't seem to always return the correct "Artikelomschrijving"(H) every time. I get incorrect return values when I extend this formula to other product groups.
I read that the data needs to be sorted ascending cause I use match_type 1. When I do that I get the right returns for some product groups, but the given example suddenly returns incorrect values.
I can't sort both column C and A in ascending order for the formulas to always return correct items. Can you help me to get past this hurdle?
After a little bit of google translate work, if I'm understanding your question correctly, you need to find the "Item Description" (H) of the record where the "Line" (B) = the value in N1 and the time is between the start and end times.
This is an array formula, you have to confirm it with Ctrl+Shift+Enter
=INDEX(Data!$H$2:$H$157,MATCH(1,(Data!$B$2:$B$157=$N$1)*(Data!$C$2:$C$157<$A2)*(Data!$D$2:$D$157>=$A2),0))
OR with semicolon syntax:
=INDEX(Data!$H$2:$H$157;MATCH(1;(Data!$B$2:$B$157=$N$1)*(Data!$C$2:$C$157<$A2)*(Data!$D$2:$D$157>=$A2);0))
I found the solution, thank you for pointing me in the right direction Valon Miller. This is the formula I fixed it with:
=ALS.FOUT(INDEX(Data!$H$2:$H$154;MATCH(1;(Conversie!L$1=Data!$B$2:$B$154)*((Conversie!$A32>=Data!$C$2:$C$154)*(Conversie!$A32<=Data!$D$2:$D$154));0));"")

Substracting two values in same column in Spotfire

I am a beginner in spotfire. I need to make a calculated column from the data shown below
The first column is a list of schools, the second column is the list of ranks students got in an exam and the third is the Score/Mark the particular student got. I need to create a calculated column such that corresponding to every 4 th rank rank of each school I need to see the difference in Score obtained by Rank1 and Rank4 in the same school. I am attaching the desired result below
I think the slution is to use some variant of OVER , but I am not able to figure it out
This will get you what you are looking for
If(([Rank]=1) or ([Rank]=4),[Mark] - Max([Mark]) OVER (Intersect([School],Previous([Rank]))))
#user7266220 - The below expression should get you the desired result.
(If([Rank]=4,[Mark])) - Sum([Mark]) over (Intersect(firstnode([Rank]),[School]))
This works irrespective of rank order.

Resources