Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
494 views
in Technique[技术] by (71.8m points)

Google Sheet - How to FULL OUTER JOIN with one table?

I would like to create a tables for my tournament. I create a table with some players and their leagues.

Players

I would like to generate matchmaking table, by league, like that

Matchmaking table generated

I'm to weak with google spreadsheet to do that. I understood I can't use "JOIN" with "QUERY()" function. It seems I need to use "ArrayFormula()" and "VLOOKUP()" functions but after hours pasted to try, I failed.

If anyone of you can help me, it will be so great !

Here is a googlesheet with datas : https://docs.google.com/spreadsheets/d/19ThnwVme8f3Ee730w8lTAyEJE9YdxzLEfox8arl5Q4o/edit?usp=sharing

Thanks a lot, I hope my problem is clear :)

Edit : Seems we are limited by number of characters in REPT() function. If there is an other solution than the answer or a "workaround", feel free to share it :)


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

try:

=ARRAYFORMULA(UNIQUE(QUERY(SPLIT(IF(
 FLATTEN(SPLIT(REPT(CONCATENATE(IF(A3:A="";;A3:A&"?"&B3:B&"?"&C3:C)&"?"); COUNTA(A3:A)); "?"))<
 FLATTEN(SPLIT(CONCATENATE(REPT(IF(A3:A="";;A3:A&"?"&B3:B&"?"&C3:C)&"?"; COUNTA(A3:A))); "?")); 
 FLATTEN(SPLIT(REPT(CONCATENATE(IF(A3:A="";;A3:A&"?"&B3:B&"?"&C3:C)&"?"); COUNTA(A3:A)); "?"))&"?"&
 FLATTEN(SPLIT(CONCATENATE(REPT(IF(A3:A="";;A3:A&"?"&B3:B&"?"&C3:C)&"?"; COUNTA(A3:A))); "?"));
 FLATTEN(SPLIT(CONCATENATE(REPT(IF(A3:A="";;A3:A&"?"&B3:B&"?"&C3:C)&"?"; COUNTA(A3:A))); "?"))&"?"&
 FLATTEN(SPLIT(REPT(CONCATENATE(IF(A3:A="";;A3:A&"?"&B3:B&"?"&C3:C)&"?"); COUNTA(A3:A)); "?"))); "?"); 
 "select Col1,Col2,Col4,Col5,Col6
  where Col1 <> Col4 
    and Col3 =  Col6")))

enter image description here


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...