web-dev-qa-db-ja.com

Googleスプレッドシートでカスタムシーケンスを生成する

カスタムシーケンスで列を作成したいと思います:A-Z,a-z,0-9。 (基本的に Base64文字セット 最後の2文字は+および/、省略)したがって、A1はAAA、A2はAABになります... AAZ、AAAA、...、AA8、AA9、ABA、ABBなどに続きます。

AAAは数値的にはAと同じ(両方とも0)ですが、シーケンス全体で同じ桁数を維持する必要があることに注意してください。

これを数字だけで行うのは簡単です:=A1+1と列の下までコピーします。

これをシートで(おそらく配列数式を使用して)行うか、関数を使用して行う簡単で効率的な方法はありますか?少なくとも40000回の反復に進む必要があります(正しく計算した場合は40000 = KZK)。

最終的には、次のようになります。

article_AAA

article_AAB

article_AAC

...

article_KZI

article_KZJ

article_KZK

私はあまり数学者ではありませんが、このサイトが役立つと思います: https://www.dcode.fr/base-n-convert

1
Joe
=ARRAYFORMULA(REGEXREPLACE(TRANSPOSE(QUERY(TRANSPOSE((CHAR({{
 TRANSPOSE(SPLIT(    TEXTJOIN(",",1,REPT(ROW(INDIRECT("A"&65&":A"&68))&",",3844)),","));
 TRANSPOSE(SPLIT(","&TEXTJOIN(",",1,REPT(ROW(INDIRECT("A"&69&":A"&72))&",",3844)),","));
 TRANSPOSE(SPLIT(","&TEXTJOIN(",",1,REPT(ROW(INDIRECT("A"&73&":A"&74))&",",3844)),","));
 TRANSPOSE(SPLIT(","&TEXTJOIN(",",1,REPT(75&",",1561)),","))},{
 TRANSPOSE(SPLIT(REPT(TEXTJOIN(",",1,REPT({ROW(INDIRECT("A"&65&":A"&90))&",";
        ROW(INDIRECT("A"&97&":A"&122))&",";ROW(INDIRECT("A"&48&":A"&57))&","},62)),2),","));
 TRANSPOSE(SPLIT(REPT(TEXTJOIN(",",1,REPT({ROW(INDIRECT("A"&65&":A"&90))&",";
        ROW(INDIRECT("A"&97&":A"&122))&",";ROW(INDIRECT("A"&48&":A"&57))&","},62)),2),","));
 TRANSPOSE(SPLIT(REPT(TEXTJOIN(",",1,REPT({ROW(INDIRECT("A"&65&":A"&90))&",";
        ROW(INDIRECT("A"&97&":A"&122))&",";ROW(INDIRECT("A"&48&":A"&57))&","},62)),2),","));
 TRANSPOSE(SPLIT(REPT(TEXTJOIN(",",1,REPT({ROW(INDIRECT("A"&65&":A"&90))&",";
        ROW(INDIRECT("A"&97&":A"&122))&",";ROW(INDIRECT("A"&48&":A"&57))&","},62)),2),","));
 TRANSPOSE(SPLIT(REPT(TEXTJOIN(",",1,REPT({ROW(INDIRECT("A"&65&":A"&90))&",";
        ROW(INDIRECT("A"&97&":A"&122))&",";ROW(INDIRECT("A"&48&":A"&57))&","},62)),2),","));
 TRANSPOSE(SPLIT(TEXTJOIN(",",1,REPT({ROW(INDIRECT("A"&65&":A"&89))&","},62)),","));
 TRANSPOSE(SPLIT(TEXTJOIN(",",1,REPT(90&",",11)),","))},{
 TRANSPOSE(SPLIT(TRANSPOSE(REPT(TEXTJOIN(",",1,{ROW(INDIRECT("A"&65&":A"&90));
                 ROW(INDIRECT("A"&97&":A"&122));ROW(INDIRECT("A"&48&":A"&57))})&",",150)),","));
 TRANSPOSE(SPLIT(TRANSPOSE(REPT(TEXTJOIN(",",1,{ROW(INDIRECT("A"&65&":A"&90));
                 ROW(INDIRECT("A"&97&":A"&122));ROW(INDIRECT("A"&48&":A"&57))})&",",150)),","));
 TRANSPOSE(SPLIT(TRANSPOSE(REPT(TEXTJOIN(",",1,{ROW(INDIRECT("A"&65&":A"&90));
                 ROW(INDIRECT("A"&97&":A"&122));ROW(INDIRECT("A"&48&":A"&57))})&",",150)),","));
 TRANSPOSE(SPLIT(TRANSPOSE(REPT(TEXTJOIN(",",1,{ROW(INDIRECT("A"&65&":A"&90));
                 ROW(INDIRECT("A"&97&":A"&122));ROW(INDIRECT("A"&48&":A"&57))})&",",150)),","));
 TRANSPOSE(SPLIT(TRANSPOSE(REPT(TEXTJOIN(",",1,{ROW(INDIRECT("A"&65&":A"&90));
                 ROW(INDIRECT("A"&97&":A"&122));ROW(INDIRECT("A"&48&":A"&57))})&",",45)),","));
 TRANSPOSE(SPLIT(TRANSPOSE(TEXTJOIN(",",1,ROW(INDIRECT("A"&65&":A"&75)))&","),","))}}))), , 
 40001)), " ", ""))

0

1
user0