在Google表格中输出数据并保留空格。

huangapple go评论60阅读模式
英文:

Outputting data with keeping spaces in Google Sheets

问题

To output the numbers in the column with spaces from the "data" column while maintaining the condition based on cell E2 (twopoints), you can modify the formula as follows:

ARRAY_CONSTRAIN(ARRAYFORMULA(IF(REGEXMATCH(MAP(E2, LAMBDA(z, FILTER(TOCOL(A3:C, 3), REGEXMATCH(TOCOL(A3:C, 3), "(?i)"&z))), TRUE), REGEXEXTRACT(MAP(E2, LAMBDA(z, FILTER(TOCOL(A3:C, 3), REGEXMATCH(TOCOL(A3:C, 3), "(?i)"&z))), "([0-9]+):"), )), COUNTA(A3:A), 1))

Please note that I've made the necessary translation while keeping the code part unchanged.

英文:

What should I change in the formula to output the numbers in the column with spaces, if they are in the "data" column? At the same time, make sure to save the condition, according to which the data is output according to cell E2 (twopoints).

Now there is a formula (in the yellow cell), which by condition pulls the necessary numbers from the cells and outputs them to the column without spaces. File link:
https://docs.google.com/spreadsheets/d/1SgimsVnIE_-8SifLWK__3Okjq2mkSSSju-cCISDoJ7Q/edit#gid=125682155

ARRAY_CONSTRAIN(ARRAYFORMULA(IF(REGEXMATCH(MAP(E2;LAMBDA(z;FILTER(TOCOL(A3:C;3);REGEXMATCH(TOCOL(A3:C;3);"(?i)"&z))));)=TRUE;REGEXEXTRACT(MAP(E2;LAMBDA(z;FILTER(TOCOL(A3:C;3);REGEXMATCH(TOCOL(A3:C;3);"(?i)"&z))));"([0-9]+):");));COUNTA(A3:A);1)

答案1

得分: 2

=byrow(B3:C;lambda(Σ;if(counta(Σ)=0;;ifna(--regexextract(torow(index(if(regexmatch(Σ;E2);Σ;));1);"(\d+):")))))

在Google表格中输出数据并保留空格。

英文:

You may try:

=byrow(B3:C;lambda(Σ;if(counta(Σ)=0;;ifna(--regexextract(torow(index(if(regexmatch(Σ;E2);Σ;));1);"(\d+):")))))

在Google表格中输出数据并保留空格。

huangapple
  • 本文由 发表于 2023年4月19日 15:25:40
  • 转载请务必保留本文链接:https://go.coder-hub.com/76051770.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定