Reputation: 3796
I have a text file like this.
Name
Address
Road
Name
Address
Road
I want to convert this to
Name,Address,Road
Name,Address,Road
I don't know how to do this in excel. Can anyone help? I have tried searching Google with no luck.
Upvotes: 0
Views: 86
Reputation: 59485
With the first Name
in A2 (C1 blank), in B2:
=MOD(ROW(),3)
in C2:
=IF(B2=2,A2,C1&","&A2)
both copied down to suit. Then select, Copy, Paste Special, Values over the top, Filter to select and delete 0
and 2
in ColumnB, then remove filter and delete ColumnB.
In effect very similar to @user2348184's approach, though perhaps a little simpler.
NB If the first Address
is in A4, filter and delete blank rows (except Row1) first.
Upvotes: 1
Reputation: 819
Not sure how automated you need it to be but this works:
Upvotes: 1