本文介绍了CONCATENATE和TEXTJOIN公式/ Excel / VBA的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我再次遇到一些问题。这是交易:





我想要使用TEXTJOIN函数连接范围A:G中的所有元素,请跳过潜在的空单元格。
问题是,我必须按照一定的顺序...这是H列表示的:每个字母表示一个字母的键



我的想法是使用这个公式:



= CONCATENER(=;JOINDRE.TEXTE( - ; VRAI;; STXT ; 1; 1); LIGNE(H2); ;; STXT(H 2; 2:1); LIGNE(H2); ;; STXT(H 2; 3; 1); LIGNE(H2); ; ; STXT(H 2; 4; 1); LIGNE(H2); ;; STXT(H 2; 5; 1); LIGNE(H2); ;; STXT(H2; 6; 1); LIGNE(H2) ;;; STXT(H2; 7; 1); LIGNE(H2);))



(我知道, haha)



然后将其复制并粘贴到另一个单元格中的值中,以执行该技巧(= textjoin公式的实际结果)。
不幸的是,这个想法不起作用...



我还试图在textjoin公式中使用没有我的分隔符的方括号,然后替换 - by - 用宏,但似乎不起作用...



任何线索?



谢谢你们,感谢已经在这篇文章中帮助我的ppl:



Jean

解决方案

这是您正在寻找的Textjoin函数:

  = TEXTJOIN  - ,TRUE,INDIRECT(MID(H2,1,1)及ROW(H2)),间接的(MID(H2,2,1)及ROW(H2)),间接的(MID(H2,3, 1)及; ROW(H2)),间接的(MID(H2,4,1)及ROW(H2)),间接的(MID(H2,5,1)及ROW(H2)),间接的(MID( H2,6,1)& ROW(H2)),INDIRECT(MID(H2,7,1)& ROW(H2)))


I'm having again some problems. Here's the deal:

I'd like to use the TEXTJOIN function to concatenate all the elements within the range A:G, skiping the potential empty cells.The problem is, I have to follow a certain order... This is what the H column indicates : a key where each letter represents a colum

My idea was to use this formula :

=CONCATENER("=";"JOINDRE.TEXTE("" - "";VRAI;";STXT(H2;1;1);LIGNE(H2);";";STXT(H2;2;1);LIGNE(H2);";";STXT(H2;3;1);LIGNE(H2);";";STXT(H2;4;1);LIGNE(H2);";";STXT(H2;5;1);LIGNE(H2);";";STXT(H2;6;1);LIGNE(H2);";";STXT(H2;7;1);LIGNE(H2);")")

(I know, it looks so bad haha)

And then copy and paste it in values in another cell to do the trick (= the actual resultat of the textjoin formula).Unfortunately that idea doesn't work...

I also tried to use the formula without the brackets around my separator in the textjoin formula and then replace " - " by "" - "" with a macro but it does not seem to work as well...

Any clue?

Thanks guys, and thanks to the ppl who already helped me in this post:VBA - Count empty cols, search and replace

Jean

解决方案

This is the Textjoin function you're looking for:

 =TEXTJOIN("-",TRUE,INDIRECT(MID(H2,1,1)&ROW(H2)),INDIRECT(MID(H2,2,1)&ROW(H2)),INDIRECT(MID(H2,3,1)&ROW(H2)),INDIRECT(MID(H2,4,1)&ROW(H2)),INDIRECT(MID(H2,5,1)&ROW(H2)),INDIRECT(MID(H2,6,1)&ROW(H2)),INDIRECT(MID(H2,7,1)&ROW(H2)))

这篇关于CONCATENATE和TEXTJOIN公式/ Excel / VBA的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-19 14:10