MacroMoron
New Member
- Joined
- Jan 27, 2014
- Messages
- 4
Hello there,
I'm looking to modify some existing code for a macro that concatenates a range of data. Essentially, I'm looking to do the following:
The above may be very unclear so I'll explain this with some images:
- Highlighted rows signify where repeated data occurs in column A. Only the first instance of the data highlighted in green must remain. The rows in red need the data from column C concatenated into column C of the green row. When this is complete, they need to be deleted.
- Above, data is concatenated into column C.
- Above, after concatenating the data, the repeated rows are deleted.
I hope I've made this clear but let me know if I need to clarify anything. Any help on this issue would be greatly appreciated.
I'm looking to modify some existing code for a macro that concatenates a range of data. Essentially, I'm looking to do the following:
- Search through data in column A (all strings) and find an instance where a row is a repeat of the row above it.
- In the repeated row (let's say A2 contains "Bob" and A3 contains "Bob") concatenate the information from another column in the same row (e.g. column C3) into the row of the same column above it (ergo, info in C3 is concatenated into C2).
- A separator/divisor needs to be included whilst concatenating.
- With the data from the repeated row concatenated, this row must now be deleted.
The above may be very unclear so I'll explain this with some images:
- Highlighted rows signify where repeated data occurs in column A. Only the first instance of the data highlighted in green must remain. The rows in red need the data from column C concatenated into column C of the green row. When this is complete, they need to be deleted.
- Above, data is concatenated into column C.
- Above, after concatenating the data, the repeated rows are deleted.
I hope I've made this clear but let me know if I need to clarify anything. Any help on this issue would be greatly appreciated.