[英]excel, merge two columns between static column and list of numbers
column A, static value: A 列,static 值:
302_000
302_000
302_000
column B, list of numbers, separated by. B 列,数字列表,以分隔。 (except is there is only 1 number in the cell):
(除了单元格中只有 1 个数字):
222. 57. 5.
389. 390.
412
column c, after merge: c 列,合并后:
302_000_222, 302_000_057, 302_000_005
302_000_389, 302_000_390
302_000_412
any recommendations?有什么建议吗?
=A1 & SUBSTITUTE(B2, ". ", ", "&A1)
This prefixes the value with the constant, and then replaces each dot with a comma and that constant这会在值前面加上常量,然后用逗号和常量替换每个点
In C2 put the array formula:在 C2 中放入数组公式:
=TEXTJOIN(",",,A2&"_"&TEXT(TRIM(MID(SUBSTITUTE(LEFT(TRIM(B2),LEN(TRIM(B2))-1),".",REPT(" ",99)),(ROW($ZZ$1:INDEX($ZZ:$ZZ,LEN(LEFT(TRIM(B2),LEN(TRIM(B2))-1))-LEN(SUBSTITUTE(LEFT(TRIM(B2),LEN(TRIM(B2))-1),".",""))+1))-1)*99+1,99)),"000"))
Being an array formula it needs to be confirmed with Ctrl-Shift-Enter instead of Enter.作为一个数组公式,它需要使用 Ctrl-Shift-Enter 而不是 Enter 来确认。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.