I have been searching for a way to make a "Top Ten" list for my uncles hockey league in Excel.
There are 5 different teams with their own worksheets and I made a separate worksheet called "data" referencing all of the players and their individual stats so that I could pull my "Top Ten" from one worksheet instead of five.
The worksheet is setup as follows:
Player1 Player2 Player3 etc...
Name
Team
Goals
Assists
Points
I would like to search for the player with the highest number of "Points" and return the name, team, goals, assists, and points on a single row, and then move down for the next player, i.e.:
Name 1 Team Goals Assists Points
Name 2 Team Goals Assists Points
I have tried using multiple ways including index and hlookup with the large and match commands, but could not get anything to work.
I feel like I am missing something simple here.
If it would be easier to have the players in rows, I could do that.
I was just having a problem with my references filling in the way I wanted them to.
Initial table:
B1: =COUNTA(B6:O6)(the number of players)
B6:O6 Name
B7:O7 Team
B8:O8 Goals
B9:O9 Assists
B10:O10 Points
Formulae below determine the rank for the player. If the score of points are equal, the player having a greater number of goals ranks higher.
B4: =$B$1-RANK(B$10;$B$10:$O$10)+B8/1000, the formula is copied to the right. The result will be fractional numbers with equal integer parts for the equal amount of points.
B3: =RANK(B4;$B$4:$O$4), the formula is copied to the right
B2: =IF(COUNTIF(C$3:$O$3;B3)>0;B3+COUNTIF(C$3:$O$3;B3);B$3)
Ranked table:
A15 and down : Rank (1,2...n)
B15 and down : =HLOOKUP(A15;$A$2:$O$3;2;FALSE)
In the next columns: Name (col C), Goals (col D), Assists (col E), Points (col F)
C15: =HLOOKUP($A15;$A$2:$O$10;5;FALSE)
D15: =HLOOKUP($A15;$A$2:$O$10;7;FALSE)
E15: =HLOOKUP($A15;$A$2:$O$10;8;FALSE)
F15: =HLOOKUP($A15;$A$2:$O$10;9;FALSE)
Formulae in B11:E11 will be copied down.
Example spreadsheet: http://www.bumpclub.ee/~jyri_r/Excel/Top_players_matrix_transposed.xls
you have to transpose the table first..
select all the rows and columns of your table.
right click the first cell where you want to paste the table
click paste special option
check the transpose check-box in the dialog-box opened.
your table is now transposed. now simple sorting can give u answer
for sorting columns :
select the whole table and click on the sort option on menu bar,
now you can retrieve all 10 top teams from this sorted list.
Related
please give me a hint on how to make this table.
Turn
Player
Points
1
Player1
10
2
Player3
15
3
Player1
22
4
Player6
10
...and so on. Basically, each turn some player earns some points. We don't know the number of players until the end, so I can't just make a list of players aside and SUMIF their points.
I only need to find the WINNER, a player with the maximum amount of points, i.e. in this table it would be Player1 with 10+22=32 points.
I only need one cell with WINNER: Player7
Is there a nice solution for this?
I'm using Excel 365, but vba is not allowed.
With Office 365:
=LET(
ply,B2:B5,
pts,C2:C5,
unq,UNIQUE(ply),
INDEX(SORTBY(unq,SUMIFS(pts,ply,unq),-1),1,1))
I would start by limiting the size of the table, e.g. to 500 rows.
You could make it a million rows, but it will slow the calculation
Title Column D "Cumulative Points".
In cell D2 enter "=SUMIF(B$2:B2,B2,C$2:C2)" and copy it down the column to 500 rows
In cell D3, this will become "=SUMIF(B$2:B3,B3,C$2:C3)" etc.
Title Column E "Player"
In cell E2 write "= B2" and copy it down 500 rows
Title Column G "Winner"
In cell G2 write "=VLOOKUP(MAX(D$2:D$500),$D$2:$E$500,2,FALSE)"
Hide columns D and E
Picture of spreadsheet before hiding cells
I have a table that looks like this:
Type Value
Movie 5
Food 3
Gas 10
Food 2
.... ....
And There's a second table I want to fill in with "Value" based on their type in the first table, so that the corresponding rows look like this:
Rent Food Movie Gas Clothing ... ( appear in specific order bc they are subcategories)
5
3
10
2
The title row is already there, so I was thinking there might be some kind of lookup method to do this? How do I do that?
your second table apperas to hold one value per row but it doesn't have a label. it does correlate to the original row number, is this by design or coincidence?
if this is by design then you can use those 2 columns, hide them if you like, get a unique list of categories by copying you r abels to a new colum, removing duplicates in the data tab, then paste special transpose in c1 to create colum headers.
so column a and b remain unchanged
row 1 contains header starting at column c
your data starts at c2
this is the formula
=Iferror(vlookup(C$1,$A2:$B2,2,false),"")
drag it down and to the right
you can copy paste special values when done to remove the formulas
for something with only a hundred or thousand cells this will be one of the easier options but i would not do this on large tables, for those i would use power query or VBA
Assuming your 1st table is in Sheet1 and 2nd table is in sheet2.. you may try to fill in Sheet2!A2
=IF(Sheet1!$A2=A$1,Sheet1!$B2,"")
and drag it all the way.. Hope you get how it works.. and what you need.
I'm trying to create a chart that finds the name of the first (then second, third, fourth, etc.) largest entry (via total sales) that meet certain criteria from a second Excel worksheet. (i.e. I want to find the largest sales value that is of the good "Apples" and sold in "Europe" if you will, as well as display the customer that this largest sales dollar amount was sold to.)
I've created some code that is giving me the name corresponding to the largest value on the sheet (very good!). However, this name does not meet the criteria in my if statement.
Example code: =INDEX('Sheet1'!B:B,MATCH(1,INDEX(('Sheet1'!V:V=LARGE(IF(AND('2. Sheet1'!E2:E1000="Apple", 'Sheet1'!W2:W1000="Europe"), 'Sheet1'!V:V, ""), ROWS(C$1:C1)))*(COUNTIF(C$1:C1,'Sheet1'!B:B)=0),),0))
B is the column with the customer name, V is the column with the overall sales amount, E is the column showing the name of the item sold, W is the name of the geographic area, C is the column (on the new sheet) where the name of the customer will be duplicated.
What I want to see is the customer who bought the most apples in Europe...but instead I'm getting the largest sales volume over all.
To make it stranger, if "apples" and "Europe" don't appear on the top row of Sheet1, I'm getting #N/A. (This does not happen, though, if these are contained in the top row.)
Does anyone have any thoughts as to how to fix?
In the following sample data image, the formulas in AB2:AC2 are:
=AGGREGATE(14, 6, (V$2:V$21)/((W$2:W$21=AA2)*(E$2:E$21=Z2)), COUNTIFS(Z$2:Z2, Z2, AA$2:AA2, AA2))
=INDEX(B:B, AGGREGATE(15, 6, ROW($2:$21)/((E$2:E$21=Z2)*(W$2:W$21=AA2)*(V$2:V$21=AB2)), COUNTIFS(Z$2:Z2, Z2, AA$2:AA2, AA2, AB$2:AB2, AB2)))
If you need to do it all in one formula, substitute the formula from AB2 (sans =) for every occurrence of AB2 within the formula from AC2.
Fill down as necessary.
1) I have two tables. 1st table contains data for more then 20,000 rows and 2nd table I already have the following columns details i.e. Region, Item, Number and I just have to get the Total value of the product from the 1st table
2) There are two types of prices in the 1st table . One is Retail Price and Another one is a Wholesale price
3) In each of the regions Rep, Item and Numbers are same in most of the cases, but the Total price is different
4) I am able to get the Total price details in 2nd table through vlookup formula (After concatinating the following columns i.e. Region, Item and Number from both the tables) wherever there is an account number for retail price
5) Currently I am manually updating "Total Price" details in 2nd table for Wholesale price which is taking lot of time.
Is it possible to build a formula to get the wholesale price details in the 2nd table, since there are more then one account number, but the price is same
If the wholesale price is the lowest price for the specific item, then you can find it with the formulas MIN and IF.
Based on your screen shot:
D is the column with the list of items
I5 is the cell with the item name for which you want to find the wholesale price
F is the column with the list of prices
If you enter the following formula in cell K5, it should find the lowest price for pencils
=MIN(IF(D:D=I5,F:F))
On this link, there is an explanation if you want to use multiple criteria.
http://www.contextures.com/excelminmaxfunction.html
try the sumifs function.
It takes multiple arguments and criteria. So it should look something like:
cell value at j5 = sumifs(f3:f23, b3:b23, h5, d3:d23, i5....)
you need to mark off which rows in your first table are wholesale selling. So it should be a column of some kind. Once you do that, let's say in column G, then you add onto the sumifs function...
, g3:g23, L5)
What you're doing is summing up all of the values in column F where h5 (region) matches in b3:b23, i5 (item) match in d3:d23, and where L5 (retail type) match in a new column g2:g23.
This will find all of the values that match that criteria exactly.
Vlookup is useful, but it's harder to scale IMO than the advanced if functions.
SUMIFS is probably the better way to go on this one, but as an alternative there is also SUMPRODUCT.
=SUMPRODUCT(($H3=$B$3:$B$20004)*($I3=$D$3:$D$20004)*($J3=$E$3:$E$20004)*($F$3:$F$20004))
The * acts as an AND statement in a logical check, and each of the ($H3=$B$3:$B$20004) is a logical check. When the row is true it will evaluate to 1. When it is false it will evaluate to 0. in the end you wind up with a list of prices or 0s that get summed. The end result is the sum of everything that matches your criteria.
The danger of using this formula is that it can get labour intensive as it is performing array calculations without being an array formula.
EDIT: The intended output is to have one spreadsheet of the untouched IDs and commodity categories, and one spreadsheet with 1 occurrence of ID with the commodity categories combined. This is because I'm writing reports on total number of commodities and total number of unqiue incidents.
I have a spreadsheet that has an ID number across multiple rows with a commodity category and what I need to do is get the commodity categories associated with that ID number into the same cell. I'm seeing a lot of stuff about INDEX/MATCH but I'm not sure how it applied to my specific example.
Most examples are outputting data from the same column into the same row/multiple columns or something slightly different. I need to do this row about 600 rows and all have varying amount of rows and values. Some IDs have only one value, some have 40 values, and some have 2. Appreciate the help.
The intended input/output is below.
EX:
ID Commodity Category
A01-0301 Food and Beverage
A01-0301 Apparel and Accessories
A01-0301 Food and Beverage
A01-0302 Other
ID Commodity Category
A01-0301 Food and Beverage, Apparel and Accessories, Food and Beverage
A01-0302 Other
'Dirty' but might be adequate, assuming ID is in A1:
Sort by ID, copy last populated cell in ColumnA down one cell. In C2:
=IF(A1=A2,C1&","&B2,B2)
in D2:
=A2=A3
Select all, Copy, Paste Special, Values over the top, filter ColumnD to select TRUE and delete visible, adjust bottom entry.