Q:

Latest N scores by ID (AKA rows to columns by ID)

I have as my data a list of IDs that track scores over time like so:
ID | Score | Timestamp
1  | 50    | 09/23/17
1  | 45    | 09/30/17
1  | 43    | 10/07/17
1  | 46    | 10/14/17
2  | 35    | 09/30/17
2  | 41    | 10/07/17
2  | 40    | 10/14/17
3  | 12    | 10/07/17
3  | 18    | 10/14/17

Most IDs have dozens of entries, but newer ones might have as few as one or two.
I want to generate a table of scores by ID using this table, like so:
ID | Latest Score | 2nd Latest Score | ...
1  | 46           | 43               | 45   | 50
2  | 40           | 41               | 35   | NULL
3  | 18           | 12               | NULL | NULL

So the cell for latest score for ID 1 would either scan the data for the last row with ID 1 or the latest date for ID 1 (they're the same), then return the corresponding score (46).
I'm having trouble figuring out how to achieve this. Any help is appreciated.

A:

Try this array formula (click Ctrl + Shift + Enter together inside formula bar):
=IFERROR(INDEX($B$2:$B$10,MATCH(LARGE(IF(($A$2:$A$10=$E2)*($C$2:$C$10),($A$2:$A$10=$E2)*($C$2:$C$10),""),COLUMN(F2)-COLUMN($E2)),($A$2:$A$10=$E2)*($C$2:$C$10),0)),"")

Basically, I used LARGE to return the latest score (based on Timestamp but let me know if this is wrong) and the INDEX/MATCH to lookup for the value to return.  Try and see if this makes sense to you or let me know if I am missing anything.

