![]() |
Sort cell values of different columns
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 |
Sort cell values of different columns
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. "murthy" wrote: 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 |
All times are GMT +1. The time now is 02:01 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com