Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

I have data looking like this:

John
1231231234
john@email.com
Bob
1241241244
bob@email.com

I would like to have it look like this

john, 1231231234, john@email.com
Bob, 1241241244, bob@email.com

What's the easiest way to do so in Excel?

question from:https://stackoverflow.com/questions/65602552/splitting-rows-and-moving-to-csv-lines-in-excel

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

1 Answer

Note this assumes 3 cells per as a pattern:

Office 365/2019:

=TEXTJOIN(", ",TRUE,INDEX(A:A,(ROW($ZZ1)-1)*3+1):INDEX(A:A,(ROW($ZZ1)-1)*3+3))

enter image description here

Older:

=IF(INDEX(A:A,(ROW($ZZ1)-1)*3+1)<>"",INDEX(A:A,(ROW($ZZ1)-1)*3+1) & ", " & INDEX(A:A,(ROW($ZZ1)-1)*3+2) & ", " & INDEX(A:A,(ROW($ZZ1)-1)*3+3),"")

enter image description here


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...