richh
Board Regular
- Joined
- Jun 24, 2007
- Messages
- 245
- Office Version
- 365
- 2016
I have a large data table that was not very well put together. I need to find the last test date a student took a specific test in a range that contains also contains dates for the other tests they've taken. My table is as such:
ID | LName | Test Date | Math Test | Score | Eng Test | Score |
123| Smith | 01/01/19 | X________| 40__|
123| Smith | 02/01/19 | X________| 30__|
123| Smith | 03/01/19 | _________|_____| X_______| 75___|
123| Smith | 04/01/19 | X________| 50__|
123| Smith | 05/01/19 | _________|_____| X_______| 76___|
I need to find ID 123's last math test and its score. The row count on this data is into the tens of thousands, so doing this manually would be a nightmare! I know I can do a MATCH to find the first instance of the ID, but I don't know how to find the last. I'm thinking that if I find the first/last row of the ID, I can do a MAX on the range then do an INDEX MATCH on the ID and date to return the score. The problem I'm having is that the dates may be for other tests; the last date, 05/01/19, pertains to an English test, so it's not applicable to math.
ID | LName | Test Date | Math Test | Score | Eng Test | Score |
123| Smith | 01/01/19 | X________| 40__|
123| Smith | 02/01/19 | X________| 30__|
123| Smith | 03/01/19 | _________|_____| X_______| 75___|
123| Smith | 04/01/19 | X________| 50__|
123| Smith | 05/01/19 | _________|_____| X_______| 76___|
I need to find ID 123's last math test and its score. The row count on this data is into the tens of thousands, so doing this manually would be a nightmare! I know I can do a MATCH to find the first instance of the ID, but I don't know how to find the last. I'm thinking that if I find the first/last row of the ID, I can do a MAX on the range then do an INDEX MATCH on the ID and date to return the score. The problem I'm having is that the dates may be for other tests; the last date, 05/01/19, pertains to an English test, so it's not applicable to math.
Last edited: