英文:
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+):")))))
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论