ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Sort/Merge rows (https://www.excelbanter.com/excel-programming/374782-sort-merge-rows.html)

slowjam4

Sort/Merge rows
 
Hi,
Can someone give me some ideas on how to Sort and Merge data with a
macro to accomplish the following?:

Before Sort/Merge

A1 123
A5 456
A3 789
A1 222
A5 333
A5 111
A3 655


I want to sort the data by the first column and then merge the data so
that I have unique values in the first column. I would expect the
result of the sort/merge to be:

After Sort/Merge

A1 123 222
A3 655 789
A5 333 456 111

Thanks


Dave Peterson

Sort/Merge rows
 
If you add headers, you could record a macro when you sorted by column A and
then did Data|Subtotals.

Then you'll be able to use the outlining symbols to the left to hide the
details.

===
An alternative...

Add headers and use Data|Pivottable.

It's made for this kind of stuff.

You could record the macro when you do it manually.

slowjam4 wrote:

Hi,
Can someone give me some ideas on how to Sort and Merge data with a
macro to accomplish the following?:

Before Sort/Merge

A1 123
A5 456
A3 789
A1 222
A5 333
A5 111
A3 655

I want to sort the data by the first column and then merge the data so
that I have unique values in the first column. I would expect the
result of the sort/merge to be:

After Sort/Merge

A1 123 222
A3 655 789
A5 333 456 111

Thanks


--

Dave Peterson


All times are GMT +1. The time now is 10:33 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com