I used this site to learn how to sort a two-column list, {string, number}
.
I can't find a way to combine multiple two-column lists into a single, two-column list.
For example, in Major League Baseball (MLB) there are 6 divisions. For each division, I have a column-pair that lists that division's standings. The first column lists the teams in that division, and the second column lists their total wins.
Example data:
A | B | C | D | E | F | G | H | I | J | K | L | |
---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | AL East | Wins | AL Central | Wins | AL West | Wins | NL East | Wins | NL Central | Wins | NL West | Wins |
2 | New York Yankees | 12 | Cleveland Guardians | 10 | Texas Rangers | 11 | Atlanta Braves | 12 | Chicago Cubs | 10 | Arizona Diamondbacks | 8 |
3 | Boston Red Sox | 11 | Chicago White Sox | 9 | Seattle Mariners | 9 | Miami Marlins | 9 | Cincinnati Reds | 9 | Colorado Rockies | 8 |
4 | Baltimore Orioles | 10 | Detroit Tigers | 9 | Los Angeles Angels | 8 | New York Mets | 8 | Milwaukee Brewers | 8 | Los Angeles Dodgers | 7 |
5 | Tamba Bay Rays | 9 | Kansas City Royals | 8 | Oakland Athletics | 8 | Philadelphia Phillies | 8 | Pittsburgh Pirates | 6 | San Francisco Giants | 7 |
6 | Toronto Blue Jays | 7 | Minnesota Twins | 7 | Houston Astros | 6 | Washington Nationals | 6 | St. Louis Cardinals | 4 | San Diego Padres | 6 |
The table above has a total of 12 columns.
I'd like to then add another two columns that sort the entire league by wins. Here is an example of the first 7 rows:
M | N | O | |
---|---|---|---|
1 | Team | Wins | |
2 | Atlanta Braves | 12 | |
3 | New York Yankees | 12 | |
4 | Boston Red Sox | 11 | |
5 | Texas Rangers | 11 | |
6 | Baltimore Orioles | 10 | |
7 | Chicago Cubs | 10 |
The issue is that it seems every sort/lookup can only see a single column. Meaning even if you can have it look at the range A:L, it can't actually see columns B, D, F, G, J, L, all at once. I tried doing a Query Array but that didn't collate everything into a single column.
How can this be done?
The janky solution is to have another column that lists every team and uses VLOOKUP to populate wins then use SORT in another column to sort that single column of all the teams. But I'd like to cut out that middle step, if possible, just for the sake of limiting clutter/simplifying the process.