Sort cell values of different columns

M

murthy

Using Data/Sort/ one can choose upto 3 columns to sort values. I need the
same functionality to be achieved by coding. Reason, when I use the menu
Data/Sort, I get an error message stating that '

"This Operation requires the merged cells to be identically sized."

Since the columns can't be of same size because of macro used in the last
cell to wrap the text, coding is the way to achieve the object. Can one write
the code for this.
Column B(general) , column C(text) and Column D(text) &E(numeric).
The sort has start at col B, then C, D and E all ascending. It should change
the row data which goes upto column Z.
Thanks,
murthy
 
J

Joel

You'll have the same problem sorting in VBA as with the spreadsheet when cell
are merged. You can't include merged cell in the sort area.

When you need to sort usig more than 3 keys you need to perform two seperate
sorts.

When you have four keys, first sort using key 4 and then repeat sort for the
next 3 keys. The sorrt algorithm will keep the 4th key in the correct order
when it goes and does the sort of keys 1 - 3.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top