本文介绍了用于转置、拆分和重复多列的表格公式的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在寻找一个脚本,它可以通过另一个单元格中的值来转置、拆分和重复多列.
我让它为一列工作,但想知道是否可以为多列做它:
=TRANSPOSE(SPLIT(REPT(C2 & ",",A2),",",false,true))
工作表:
I'm looking for a script that will transpose, split and repeat multiple columns by a value in another cell.
I have it working for one column but wondered if it possible to do it for multiple columns:
=TRANSPOSE(SPLIT(REPT(C2 & ",",A2),",",false,true))
Working sheet:
https://docs.google.com/spreadsheets/d/1W5kFTNF6g0DI1W_lHJJU91CBwL_YnEiLLb_NYH7GkLQ/edit?usp=sharing
解决方案
or try this shorter one:
=ARRAYFORMULA({TRANSPOSE(SPLIT(CONCATENATE(REPT(B2:B&",", A2:A^2)), ",")),
TRANSPOSE(SPLIT(CONCATENATE(REPT(C2:C&",", A2:A)), ","))})
这篇关于用于转置、拆分和重复多列的表格公式的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!