Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
117 views
in Technique[技术] by (71.8m points)

Excel how to create reference and list the names?

So I have a small table with three columns.

  • First column is a identifier (ID)
  • Second column is a reference identifier (List of ID's)
  • Third column is the name which identifies the identifier
  • Fourth column should be a calculated column which basically lists the names of the reference ID.

My question is, what should be formula for the fourth column to achieve the result below automatically? When the first three columns are given.

enter image description here

question from:https://stackoverflow.com/questions/65841315/excel-how-to-create-reference-and-list-the-names

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

If you have Excel365 then could achieve in this way. For older version VBA macro would be best approach.

=TEXTJOIN(", ",TRUE,XLOOKUP(FILTERXML("<t><s>"&SUBSTITUTE(B2,", ","</s><s>")&"</s></t>","//s"),$A$2:$A$4,$C$2:$C$4))

enter image description here


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...