I have a question about excel.
There is a sports tournament with multiple phases. And the results page looks something like this:
rank phase1 phase2
1 TOM ALBERT
2 MATT TOM
3 ROBIN MATT
The first place gets 5 points, second 3 and third 1 points.
So the summary I would like to get is like this
rank name phase1 phase2 total
1 TOM 5 3 8
2 ALBERT 0 5 5
3 MATT 3 1 4
4 ROBIN 1 0 1
I cant figure out how to generate it simply, so if I copy-paste the results from phase3 to somewhere in my excel sheet, the summary page would also update.
If you can support me with advice or just a working template, I would be thankful!
Thank you for your time!
I've done you a basic example below...just list all 50 players in the summary page and copy the formula down as it is - as per the question it only records a value for the top 3 places, hope this helps if not please let me know :)
Example file here
Assuming the structure you defined and that when you paste phase 3 it will have its header ("phase3") on the same row as the other results, you could have the following formula on your Table 2:
{=SUM(IF(IFERROR(MATCH($B2,INDIRECT("Sheet1!"&CHAR(64+MATCH(C$1,Sheet1!$1:$1,0))&":"&CHAR(64+MATCH(C$1,Sheet1!$1:$1,0))),0)-1,0)={1,2,3},{5,3,1},0))}
Note: entered as Array formula: CTRL + SHIFT + ENTER
Formula uses the Table 2 headers ("phase1","phase2", etc.) and the players names to find the results for each phase. It then uses the predefined arrays that determine points given per position. The final sum is to bring the result that are in array (other values in array are 0) into single value.
Total would sum results per player.
Under the rank cells you would place the following formula:
=RANK(F2,$F:$F)
Which would provide you the rank of each player (Column F containing the totals).
Note that this would not sort your rank automatically but you could easily do this with Sorting or Autofilter. Hope this helps. Cheers.
Related
I am trying to modify an already existing Excel file for a client. Here is the deal. They have the following Excel sheet with these columns (the picture is a simplified version of course to make it clear to you):1
If a student has completed their Bachelor they get a 1 in the Bachelor Done column, if not they get a 0. Now what they want is to check if at least one person per city has completed their Bachelor and display this in a new table with two columns (First column with the city name and second column with a Note of Yes or No).
For example let's take Lisbon. It has 2 students, George and Helen. In this case George has not completed his bachelor yet (0) but Helen has (1). In that case, Lisbon qualifies and should get a Note of YES in the new table.
Is there any way to implement this in Excel via an IF or a VLOOKUP function? I tried, but my Excel knowledge is quite limited. They also do not want to change the format of the file, as lots of people are already working with this and they are familiar with. Best case scenario could probably be the addition of extra columns.
My question is if there is a way to find for every city the highest Bachelor Done number and based on that to have a Yes or No output. The numbers for Bachelor will always be 1 or 0. So if a city has 1 and 0, 1 should be taken and display yes. If there is a city with 3 people and only zeros, No should be displayed.
If you need any clarification, please let me know.
First copy and paste all your distinct City names into a column, then remove duplicates (data... remove duplicates). In my case, I did that in column F. Then in column G, input a formula such as this:
=IF(MAXIFS(C:C,A:A,F2) = 1, "YES", "NO")
Results:
My goal is determine how many times a given teammate is matched up with another given teammate over 3 rounds of golf played by 3 different teams. The same roster of 12 players is changed up each round. The goal is to minimize the number of times the players are paired up with the same people over the 3 rounds.
I attempted to use the COUNTIFS formula in excel, but it returns 0 when checking if the name of each player is in the same "Team" range.
In my sheet, i have a table for players to show how many times they are paired up with different people in the 3 rounds. I can't even get it to calculate the matchup from Team 3 in Round 1 (Mike & Matt paired up), let alone move on to summing up the entire set of data.
From the screenshot you can see my equation =COUNTIFS(Q3:Q6,S3,Q3:Q6,T1) in cell T3, referencing the data in Q3:Q6 for the names Mike and Matt.
I've reviewed plenty of examples using COUNTIFS from other types of information/data types, so I don't understand why my formula fails. When I replace one of the cell references to a name with a wild card * then it returns a result of 1. If I take out one of the two references all together it returns a result of 1, for the player name that remains.
=COUNTIFS(Q3:Q6,S3,Q3:Q6,T1)
Q3:Q6 is the table I'm referencing at the moment. The same table is referenced for both players. S3 is Mike and T1 is Matt. Both players are listed in the reference range, so it seems to me that the condition is satisfied for both components.
I don't get any error messages, just a result of 0 when I'm expecting 1.
Because COuNTIFS() is AND not OR So the cell would need to be both Matt and Mike at the same time, which is not possible.
To do OR we need to do something slightly different:
=SUMPRODUCT(COUNTIFS(Q3:Q6,CHOOSE({1,2},S3,T1))
This will return 2 if both are in the range so to get it to 1 we do:
=--(SUMPRODUCT(COUNTIFS(Q3:Q6,CHOOSE({1,2},S3,T1))=2)
Which will now return 1 if both are found in the range and 0 if only one or none are found.
So we can string 9 of these together to get the output you want:
=(SUMPRODUCT(COUNTIF($M$3:$M$6,CHOOSE({1,2},T$1,$S2)))=2)
+(SUMPRODUCT(COUNTIF($O$3:$O$6,CHOOSE({1,2},T$1,$S2)))=2)
+(SUMPRODUCT(COUNTIF($Q$3:$Q$6,CHOOSE({1,2},T$1,$S2)))=2)
+(SUMPRODUCT(COUNTIF($M$10:$M$13,CHOOSE({1,2},T$1,$S2)))=2)
+(SUMPRODUCT(COUNTIF($O$10:$O$13,CHOOSE({1,2},T$1,$S2)))=2)
+(SUMPRODUCT(COUNTIF($Q$10:$Q$13,CHOOSE({1,2},T$1,$S2)))=2)
+(SUMPRODUCT(COUNTIF($M$17:$M$20,CHOOSE({1,2},T$1,$S2)))=2)
+(SUMPRODUCT(COUNTIF($O$17:$O$20,CHOOSE({1,2},T$1,$S2)))=2)
+(SUMPRODUCT(COUNTIF($Q$17:$Q$20,CHOOSE({1,2},T$1,$S2)))=2)
It will now count how many times the pairs were on the same team:
I do not want to know the traditional frequency or the traditional averages; so I'll give an example below:
I have this data:
1
3
5
5
2
3
5
5
1
3
The analysis that I would like to obtain is the following:
for example number 1 appears once every eight rows, number 3 appears once every four rows, number 5 appears twice every two rows....
I did it by hand, but now I have more than 21000 rows of data and I'm stuck.
I searched but I can not find a function that does it; But before I started developing my own, I decided to ask for a guide on how to achieve it.
I believe that I was able to achieve the desired result:
The formula is:
Or, if you want to copy/paste:
=IF(CONCATENATE("1-",MATCH(D1,INDIRECT(ADDRESS(MATCH(D1,A1:A17,0)+1,1,4)&":A17"),0))="1-1",CONCATENATE("2-",MATCH(D1,INDIRECT(ADDRESS(MATCH(D1,A1:A17,0)+2,1,4)&":A17"),0)-1),CONCATENATE("1-",MATCH(D1,INDIRECT(ADDRESS(MATCH(D1,A1:A17,0)+1,1,4)&":A17"),0)))
Note that the IF function solves the duplicates (like the number 5). In case you have triplicates you will have to add another instance of IF and adjust the formula accordingly.
Hope that helps!
Well this doesn't exactly reproduce your results, but you could start by looking at the max and min separation of the numbers:
=IF(COUNTIF(A$1:A$10,C2)<=1,"",MIN(IF((ROW(A$1:INDEX(A$1:A$10,COUNTIF(A$1:A$10,C2)+1))>1)
*(ROW(A$1:INDEX(A$1:A$10,COUNTIF(A$1:A$10,C2)+1))<=COUNTIF(A$1:A$10,C2)),
FREQUENCY(IF(A$1:A$10<>C2,ROW(A$1:A$10)),IF(A$1:A$10=C2,ROW(A$1:A$10)))))+1)
=IF(COUNTIF(A$1:A$10,C2)<=1,"",MAX(IF((ROW(A$1:INDEX(A$1:A$10,COUNTIF(A$1:A$10,C2)+1))>1)
*(ROW(A$1:INDEX(A$1:A$10,COUNTIF(A$1:A$10,C2)+1))<=COUNTIF(A$1:A$10,C2)),
FREQUENCY(IF(A$1:A$10<>C2,ROW(A$1:A$10)),IF(A$1:A$10=C2,ROW(A$1:A$10)))))+1)
This gives the min or max number of rows between each occurrence of the particular number.
Must be entered as an array formula using CtrlShiftEnter
You could add other statistics (like mean, standard deviation) the same way although the average could be calculated just by (lastrow-firstrow)/(count-1) e.g. for 5 it would be (8-3)/(4-1)=5/3.
I want to be able to calculate the average a student, however, if it finds a specific number between the averaged subjects, then it will return that specific number AND NOT calculate the average.
Example:
If Jack has the following averaged grades in some amount of subjects - 2 3 4 5 5 - then I would want Excel to calculate the average. The answer would be 3.8.
However, if Josh has the following averaged grades - 1 2 3 4 5 - then I would want Excel to return 1 has Josh's average because it found a specific given number in his averaged grades, in this example that would be 1. I want it to return 1 as an answer, and not 3.
I don't know if it makes any sense. I tried to make it understandable. I tried mixing up varies functions, but with no results. Do I have to use VBA for that?
Use this formula:
=IFERROR(INDEX(A:A,MATCH(1,A:A,0)),AVERAGE(A1:A5))
Try,
=if(countif(A:A, 1), 1, average(A:A))
=IF(ISNUMBER(MATCH(1,A1:A5)), 1, AVERAGE(A1:A5))
=IF(SUMPRODUCT(--(A1:A5=1)), 1, AVERAGE(A1:A5))
I have a list of names with their direct supervisor that I am trying to expand upon by showing the employees the next few layers down that work for the list of names.
Column C of the linked image brings back results of 1-7 by matching the list of names in A to those in the column of 7 names. This shows that "HB" works for "SW" but that "SW" works for "ZJ," so "HB" is technically under "ZJ" too. What I am hoping to accomplish is to have a result similar to that shown below (or something that will show the employees under each supervisor). As shown below, in the data there are many names not being searched for but that are needing to be mapped to those that are being searched for. At the current count there are 1500 employee names with 7 of them being the ones searched out of a list of 143 supervisors that repeat for the employees.
Names to Look for: "Fictional names used for scenario"
Sam W. (SW) 1
Robert R. (RR) 2
Kegan G. (KG) 3
Isiah B. (IB) 4
Orville E. (OE) 5
Robert J. (RJ) 6
Zach J. (ZJ) 7
Column A Column B Column C Column D Column E
Superv. Employ.
HB PJ 7
SW HB 1 7
BE JR 2
HB IL 1 7
IL AP 1
BE WP 2
RR BE 2
KG JW 3
JW JH 3
ZJ SW 7
These results would then be used to create lists of employees under a certain person.
Things I'm not sure affects this would be how the name is constructed in the workbook. Example Sam W. is listed as Wilson, Sam in the workbook.
Of course if there is another way to achieve the final result that would be easier then I wouldn't mind an altered format to what I currently have. If anyone has an idea how to achieve this please respond. If there are any questions about more specific things in the workbook that I could supply that could help resolve this quicker also let me know for any future inquiries I may have. Thank you.
Well, if I understand what you're asking, you need to normalize your data. In this case, that means creating two tables linked by an employee code that you'll need to create.
Once you have these two tables, you can easily perform any query and summary report you need.
Giving a range that contains the 7 names and next to them 7 numbers the name AUarray then in C3 and copied down to suit:
=IFERROR(VLOOKUP(A3,LUarray,2,0),"")
and in D2 and copied down to suit:
=IFERROR(VLOOKUP(INDEX(A:A,MATCH(A3,B:B,0)),LUarray,2,0),"")
I think something similar (but maybe a lot longer!) would work for ColumnE but I don't have time for that at present.
`