I need to sort an array in excel following the order of another one - excel

Hello everyone and thanks a lot in advance for any help.
I'm not very good using Excel. I want to know if there is a simple way in which I can sort a small two-column data matrix following the order of a column that contains all the bird species in Colombia. I study birds and I usually do avifauna characterization studies. I've always had this problem of not being able to order efficiently using the taxonomic order of species. I have always done it by hand and it takes me a really long time.
This is the file with the example that ilustrates my problem: https://docs.google.com/spreadsheets/d/1089VD4ylJiW9Xw9xRFI0ehraAc_t-qSa/edit?usp=sharing&ouid=112790797352647984659&rtpof=true&sd=true
There are two worksheets in this file. One called "Species" and the other "Data". I need to know if it is possible to make Data array can be sorted following the Species column.
I have tried creating custom lists and the number of entries to create a certain order does not allow me to put more than 100. I have also tried using commands Sort and Sortby without any success.
Again, thanks a lot for any help.
Regrets.

On the Data worksheet, add a helper column:
C2: =MATCH(A2,Species!$A$1:$A$2000,0)
and fill down.
Then Sort by the helper column

Related

How to compare and match two tables that aren't the same?

I have two tables and want them to be combined via an ID. This is what I have right now:
I want the ID values to match and become this:
I'm struggling finding a way to do this via sorting or formula. The only way I can think to do it is manually but the actual data I have is 4k lines long so doing it manually would be a huge pain.
Thank you for any help or guidance!
If data starts in A1 then:
=IFERROR(VLOOKUP(B1,C:D,2,FALSE),"")

How to INDEX(MATCH from two tables

I have two table that are vertical to one another. I make the following 3rd table from the formula below (Also see picture):
=INDEX($C$3:$C$30,MATCH(1,($I3=$A$3:$A$30)*($K3=$E$3:$E$30)*(L$2=$D$3:$D$30),0))
What I need help with is how to make this formula get data from a horizontal set of tables or tables from different worksheets:
Can I chain together ranges like so?
=INDEX($D$3:$D$14:$M$17:$M$28,MATCH(1,($J3=$A$3:$A$14:$J$17:$J$28)*($L3=$F$3:$F$14:$O$17:$O$28)*(M$2=$E$3:$E$14:$N$17:$N$28),0))
It's not working and I know there MUST be a way to do it.
The information I provided was incorrect for the second table in the Day column this might have been the reason it wasn't initially working. I have fixed it and used the suggestion given by Scott Craner!
The function that works is:
=IFERROR(INDEX($D$3:$D$14,MATCH(1,($J3=$A$3:$A$14)*($L3=$F$3:$F$14)*(M$2=$E$3:$E$14),0)), INDEX($M$17:$M$28,MATCH(1,($J3=$J$17:$J$28)*($L3=$O$17:$O$28)*(M$2=$N$17:$N$28),0)))

Taking means of irregular amounts data

I'm not able to take the means for a large dataset given that the amount of attributes is irregular.
I have posted a simplified case for the problem. It explains the problem very well.
An idea that I came up with: Make a filter to condition on a single attribute. However, still, I don't see a way to do this in an efficient way (other then doing it all by hand).
see excel file:
All help is much appreciated.
I'm basically looking for a function/method to achieve taking means of all different attributes conditioned on each person for a large dataset without doing it by hand.
You can use AVERAGEIFS() inside an IF:
=IF(OR(A2<>A1,B2<>B1),AVERAGEIFS(C:C,A:A,A2,B:B,B2),"")
the ifrst part of the if tests whether the row starts a new group either by the person or the attribute changing. Then it uses AVERAGEIFS() to return the correct average of that group. otherwise it returns a blank
What you want to do can be accomplished very simply with a pivot table.
Simply select one of the cells inside the range of data you want to process(See the video for general use of a pivot table https://www.youtube.com/watch?v=iCiayB6GrpQ )
go the insert tab and insert pivot table.
Once you have it, simply check people, attribute, and values. Then drag people and attribute into rows, drag valut into the values window, select the drop down list and change it from sum of value to average and you should be done. https://i.stack.imgur.com/nYEzw.png

Excel - Return name from list based on multiple criteria

This is my 1st post here (and not allowed to paste images). I have been trying to solve this issue for a couple of days with no luck. I'm working on an Excel spreadsheet for a game and cannot return a name based on multiple criteria. See below:
Table
I am trying to return, for example, the name of the Guardian with the highest amount of games played.
I've tried Index/match/sumproduct combinations but I can't figure this one out. Can you help me?
=index(Data!$A:$H,match((1,Data!B:B=Overview!B12)*(Data!C:C=Overview!B23)),0),1)
=MAX(IF(Data!B:B=Overview!B12,Data!C:C))
I'm thinking if I could join these two formulas together I might be able to make it work.
Try this array formula:
=INDEX(Data!$A1:$A99,MATCH(MAX(Data!$C$1:$C$99*(Data!$B$1:$B$99=B12)),
Data!$C$1:$C$99*(Data!$B$1:$B$99=B12),0))
CtrlShiftEnter
Notice that we should avoid using "full columns" in array formulas because they would introduce the computation of huge arrays and hence would slow down the formulas. I limit it here to 99 rows, use a limit that is big enough to span your data.

Dynamic Range with Categorical Variables

I'd like to sort a time series of exam performance by one of three categories:
Ideally, a function would sort the scores by "difficulty" while still preserving chronological order. I'd like to do this without filters etc. Something like this is very close, but not quite there. Do I need to use dynamic ranges? Or can I just define data ranges in the table dialog with VLOOKUP or INDEX/MATCH?
I'm thinking a bar graph would be the easiest way to illustrate the data, but I'm open to suggestions. New scores are added every day, with varying difficulties.
Here is the spreadsheet if anyone would like to look it over.
EDIT:
The output visualization could be, for example, a clustered bar graph, but with only one label per category. The idea is that I'd like to preserve chronological order without necessarily having to mark it on the graph.
Would there, for instance, be a quick-and easy and formula-driven way to put these 14 and 17 values for "score" all together under one label? I feel like 17 bar graphs clustered too closely would be hard to read.
I realize this is more of a formatting than a formula issue, but I appreciate input with regards to both.
I would recommend you add a Table over the data in the workbook. One for verbal and one for math. The upside is that it will automatically grow with your data as you add new rows. This is very helpful because charts and other things will automatically refer to the new data. Add one with CTRL+T or Insert->Table on the Ribbon.
Once you have the Table, you can easily do the sorting bit by adding a two column sort onto the Table. This menu is accessible by right clicking in the Table and doing Sort->Custom Sort. Again, the Table is nice here because it will only sort the data within it (not the whole sheet) and will remember your settings. This lets you add new data and simply do Data->Reapply to get it to sort again. Your sort on Difficulty is going to be alphabetic unless you add a number at the front. Here is the sorting step:
With this done, you can create a quick chart based on that data. For the "implicit chronology" you can simply plot score vs. difficulty for all of them since they are sorted.
To get closer to that matrix style display, you can easily create a PivotTable based on this Table and let it do the organizing by date/difficulty. Here is the result of that. I am using Average as the aggregation function since it appears that no dates have more than 1 score. If they did, it would be a better choice than Sum.

Resources