Thursday, 5 September 2013

Excel formula for merging rows

Excel formula for merging rows

Consider the following four rows in a spreadsheet
AAA VALUE TAG
AAA VALUE TAG2
AAA VALUE TAG3
AAA VALUE TAG4
I want to be able to combine all four of these rows into a single row as
follows:
AAA VALUE TAG,TAG2,TAG3,TAG4
Is this possible?
So far, I have found a formula that partially works.
=IF(A1=A2,C1&","&C2)
Which gives me the following:
AAA VALUE TAG TAG,TAG2
AAA VALUE TAG2 TAG2,TAG3
AAA VALUE TAG3 TAG3,TAG4
AAA VALUE TAG4 FALSE
To make it more complicated, sometimes there are only 2 rows where column
A matches, and sometimes there are 5 or more where column A matches.
What can I do to make this work?

No comments:

Post a Comment