It is quite an in depth excel sheet (to me) so here is a link to it: https://dl.dropboxusercontent.com/u/19122839/Movies.xlsm
On the Filters sheet, I have a search feature. This allows you to put in different genres, years, etc. and will pull up results.
The genre part does not seem to be working correctly for some reason.
In the movie_genres sheet, there is a Genre Equals and Genre Count column that seem to be marking the information correctly, but when you go to the movies sheet, the Matches Genre column does not. I use this function:
=INDEX(Genres[Genre Count],MATCH(Movies[[#This Row],[ID]],Genres[ID],0))
Which, to me, should pull the Genre Count, but in the case where there are more than one genre (I used Blank Check as an example in this case), it doesn't mark it as a 1. How can I make it so that this gets corrected.
For example, if you add the Comedy as a second genre, it pulls up more results than if you only have Family. I think I just need a fresh pair of eyes looking at this and it is probably something dumb, but any help would be great.
I believe I need to make it so that the index/match function I use in Movies[Matches Genre] will work as long as there is a 1 in Genres[Genre Count] for that ID. It only seems to work if there is a 1 in the first instance of the ID.
EDIT: I have added in a COUNT feature to better explain what I am talking about. With only Family as a genre, it shows there are 10 results, but when you add Comedy as a second genre, you get 40 results. This number should never go up as you add genres.
Perhaps try using SUMIF like this
=SUMIF(Genres[ID],[#ID],Genres[Genre Count])
If one movie might have several 1s but you only want 1 maximum then change to
=IF(SUMIF(Genres[ID],[#ID],Genres[Genre Count])>0,1,0)
Related
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:
I am really having troubles with this one:
In one column, I have a long list of company names. The company names appear several times (based on how many tickets they have raised, but that is another story).
I am now looking for a function that would give me the Company name that occurs the most often. In the Cell below I would like to get company name that occurs the second most often. In the Cell below the company that occurs the third most often end so on and so on.
I thank everyone who is spending some time to help me figure this out.
Stephan
Make a PivotTable out of the data. Put the field of interest in it as both a Row Field and as a Values field, and make sure that the aggregation being applied is a Count. (It will be by default if your things are text).
See my answer at Excel, i have a big list (44000 records), i would like to sepperate them into 2 lists, 1 with unique values and 1 with duplicate value's
Long-time user of Stack Overflow though couldn't find a clear answer to this
OBJECTIVE: Next to each Product field I need to find and retrieve a matching Brand which substring is in another worksheet.
-Worksheet 1 (Products) I have a single column with 76,000 rows
-Worksheet 2 (Brands) I have a single column with 2,000 brands and growing
Sample Data:
Products
COLUMN A
ANGEL BRAND BLACK OLIVES 2KG
ANMOL SALT TABLE 750GR
76,000 others
Brands
COLUMN A
ANTONELLI
AH
AHG
So the result should fetch a brand from a growing list and dynamically place it in the Products Worksheet:
A1- PRODUCT B1- BRAND
A2- ANGEL BRAND BLACK OLIVES 2KG B2- ANGEL
C2- ANMOL SALT TABLE 750GR C3- ANMOL
I have searched a number of forums and am convinced that the INDEX MATCH Array is what I need to do, though can't seem to get the syntax... it might be that I need to include a SEARCH in there somewhere.
This was the closest thing I found to what I need though couldn't exactly make it work for me: How to find if substring exists in a list of strings (and return full value in list if so)
Thank you for your patience in my explanation... I'll get better at this!
UPDATE: This kinda does what I am after though it takes quite a while to refresh and it's only picking up the first couple of letters as opposed to the entire word:
=IFERROR(INDEX(BRANDS!A:A,MATCH(TRUE,INDEX(ISNUMBER(SEARCH(BRANDS!A:A,A2)),,),0)),"No Match Found")
If the brand name is always included in the Products then, you can try:
=INDEX(Brands!$A:$A,MATCH(1,IF(ISERROR(SEARCH(Brands!$A:$A,A2)),0,1),0))
You enter this formula on B2 using Ctrl+Shift+Enter.
So for example, you have below set-up:
It will give you what you want. Take note though that re-calculation may take a while since you are dealing with a lot of data.
Another option would be to do this using macro which you'll need to run every time you open the workbook.
IMPORTANT: This will fail though if you have brand names like BLACK or OLIVES which is also found on the product name.
I just stuck with my school homework, it seems easy, but there is always different errors and mistakes.
Context
All I need is to connect information from 3 pages.
The first one is timetable of trainings.
The second page is "groups"
Players page
Question
1) Here is my first question. How I can put the time from the "timetable" page ?
I tried vlookup with the easiest group "children 5-7" but even this doesnt work.
The problem is that there is many possible times of some groups and I need the answer like "17:00, 18:00 etc" then.
2) The second question is with the page "players".
Firstly I need to match group or coach from page "groups". For children all is simple, but excel dont want to work even with this. But, there is one problem more. In adult group there cant be more than 4 players in one group, that why I have TK1, TK2, TK3 and TK4 - all this are for adult A. and TK11, TK22 etc are for adult B. So when its done we should match court and time from page "groups".
There is my spreadsheet so be free to try it right here. Hope you will help me!
Ref
https://docs.google.com/spreadsheets/d/1PNp60xmHOx_Q1wBc33WrzIaWmeNG5UMhi-4roV7dJXU/edit#gid=1868650910
I try to give you some ideas about how to solve your issues
Question 1:
The issue you have with VLOOKUP is that you cannot search on the left of your lookup value in the reference table. As suggested above by BruceWayne, you may use INDEX/MATCH. Considering the structure of your data a good formula could be:
=INDEX('timetable try here'!B:G,MATCH(A2,CHOOSE(B2,'timetable try here'!C:C,'timetable try here'!D:D,'timetable try here'!E:E,'timetable try here'!F:F,'timetable try here'!G:G),0),1)
In fact I am using CHOOSE() to select the column where your case should match, because your courts are numbers from 1 to 5. You may replace this formula in the column D under the label Time in your sheet named "groups try here". By the way the result that you get is only the first occurrence (in case you see a zero with some decimals figures, remind to change format to hours), so you will not be able to get the list as you like. As far as I know Excel does not have such kind of formulas. What you could do is create a VBA formula by yourself. You can find more details in this other post always here in StackOverflow, where I replied to a similar question with some code. I believe that your case is exactly the same.
Question 2
In this part I just added the last argument to the VLOOKUP and your formula works. So the correct formula should be in cell E2 of "players try here":
=VLOOKUP(D2,'groups dont try here'!A2:C15,3,0)
and in cell F2 (Court) of the same sheet:
=VLOOKUP(D2,'groups dont try here'!A2:C15,2,0)
I believe you need also a formula to pick-up the time in cell G2 (time):
=VLOOKUP(D2,'groups dont try here'!A2:D15,4,0)
These formulas of course works with suitable groups starting with "children". For the others it is not very clear to me what you need. If you have grouped all TK in Adult A and Adult B you need to have some criteria to fill in the other cells from your sheet 'groups dont try here'. Also remind that if you recode the TK1 and TK2 (for instance by adding a new column to be used as key for the VLOOKUP), with VLOOKUP you will always pick up only the first occurrence in the table.
If you need more support, please leave a comment.
I have been absolutely stymied by Sharepoint lookups and the complete lack of information anywhere that relates to my problem so one last stab at seeing if anyone has a clue if not I am going to find another job which doesnt involve the use of this very good but highly complicated system.
My problem is that I want to add a column in list 1 that looks up a column in list 2, all very easy you may think and the nice videos on you tube make it seem very easy. So imagine the frustration when I create the column choose the appropriate list from "get information from" drop down and then go to the "in this column" drop down to find the fields i want are missing. I have tried this many ways and could not resolve it. So I decided to start again and set up a brand new list 2 which contains just 4 columns each created manually one column is "just single line of text" called Financial year the other three are a "number" and called Population, Dwellings and Non Domestic. Now having done that I would expect to see thos 4 columns (Financial year, Population, Dwellings and Non Domestic) all appear in the "in this column" drop down when setting up the lookup. But no of course not bloody Sharepoint will only show: Title, Financial year, ID , Content Type, version, and Title (linked to item) none of which I am the slightest bit interested in. I want to look up Population, or Dwellings or Non Domestic. Why is this so easy to do in Excel but in Sharepoint it seems as if Bill Gates has decided he's in charge of what people lookup!! in a word its crap.
I should have added that the same happens whatever list I select to look up from.