英文:
How to remove multiple lines and make it a single line in particular cell
问题
有1000多行在我的Excel中,我想格式化这些行,以便删除多行并将它们合并成一个单行放在特定的单元格中。请帮助
PS:当我点击"合并和居中"选项时,我可以实现一行的效果,但如果我用于整个工作表,它无法正常工作。
目前显示如下:
期望效果:
英文:
There are more than 1000's of rows in my excel and I want to format the lines such that I need to remove multiple lines and make it a single line in particular cell. Please help
PS: When I click on Merge and Center option, I can achieve for one row, But if I use it for entire sheet, doesn't work out.
Currently it appears as below:
Expected :
答案1
得分: 1
以下是翻译好的内容:
以下代码应该有效,假设唯一键是Adapter和Date的组合,如果不是,那么可以进行调整。
单元格内的新行存在,但我不知道为什么我的Excel没有可视化。根据这个链接,它应该是可见的。它之所以存在,是因为如果我执行TEXTSPLIT(G2, CHAR(10))
,它会被拆分。
英文:
The following should work, assuming the unique key is the combination of Adapter and Date, if not then it can be adjusted.
=LET(AB,A2:B6, A,TAKE(AB,,1), B,DROP(AB,,1), C,C2:C6, ux,UNIQUE(AB),
uxA,TAKE(ux,,1), uxB,DROP(ux,,1), out, MAP(uxA,uxB,
LAMBDA(x,y,TEXTJOIN(CHAR(10),,FILTER(C,(A=x)*(B=y))))),HSTACK(ux,out))
The new line inside the cell is there, but I don't know why my Excel doesn't get visualized. It should be, as per this link. It is there because if I do TEXTSPLIT(G2, CHAR(10))
it gets split.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论