• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

How to Sort Multiple Selected Areas

Farrukh.Alyana

New Member
Respected Seniors,

Good day to you.

I want to know how to sort multiple selections within the same column.
Multiple areas are highlighted in "Yellow", in the attachment which I want to sort in the given sequence of columns (Ascending or Descending Order) without disturbing totals given at the end of each highlighted area.
1. Officers
2. Permanent
3. Retentional
4. Seasonal
5. Daily Wages

Can I sort all sections in one go?

I have had this problem for so long. Every time I attempt this sorting, Excel keep notifying me that "The command you chose cannot be performed with multiple selections. Select a single range and click the command again."

Waiting for your expert advice please.

Thanks and Regards.
 

Attachments

  • Sample File.xls
    24.5 KB · Views: 8
Excel is telling you that what you want will not happen, it takes just a moment to select blocks and then filter.
One thing you are going to have trouble with is the cells you have merged, never merge cells
 

Attachments

  • Copy of Sorted File.xls
    61.5 KB · Views: 1
@bobhc
Thanks for your concern and advice dear. I will be careful with merging cells in future. Even then, I cant see any merged cell in multiple selected areas as highlighted in sample sheet. The attached sheet is a specimen of my original sheet. I have a total of 57 such sections to be sorted. Though, I have completed the task by selecting individual ranges. I have tried F4 to repeat the last performed action but it didn't work. I just wanted to know if it was possible. It will be of great help and it will leave me with more time to lean back and relax. ;)
 
Avoid merging cells


Merged cells can help you arrange values in a meaningful way, but they come with problems -- numerous problems, big problems.


For instance, Excel won't apply column formats to a merged cell unless you select all the columns that comprise the merge.


In addition, not all cell formats, stick once you emerge a cell.


You can't sort a column with merged cells.


You can't even select a single-column range if there's a merged cell in it -- go ahead, try!, the whole column will become merged, not good.


You cannot put a filter on it. The problem is the filter is completely useless because the filter will groan with the "merged cells need to be identically sized." Warning, which in English means you have to make each group of merged cells the same size as the largest group. And you have to find them all!


Merging cells in columns and rows could lead to data loss, bad thing.


Formulas and Functions that refer to merged cells will not work, bad thing.


Don't hesitate to use merged cells if you really need them (you don’t), but they will limit what you can do to the cells and even the columns involved.


Center Across Selection is a far better alternative to merging.


To apply this format, select the cells you want to appear merged and then launch the Alignment group dialog, Ctrl + 1, and click the Alignment tab. Center Across Selection is in the Horizontal drop-down.


You will get the desired look you want but without the merged cell's problems.
 
  1. @bobch
Thank you for your expert advice on disadvantages of merging cells. It was really full of knowledge, learnt alot from this. Really impressed me so much that I am again posting the sample sheet without merged cells.
Now coming to the point i.e sorting multiple selected cell ranges in one go.

Please advise.

Thanks and Regards
 

Attachments

  • Sample File without merged cells .xls
    16.5 KB · Views: 8
Last edited:
I think you will need VBA for this and as I think VBA is the work of the devil you will need to wait for those that practice the black art to help you
 
It's not apparent how you want the sort to look after completion - why don't you provide an example of what you expect after the sort has been undertaken?
 
@David Evans
Sir, I have attached the sorted file for your information. I want it be sorted in ascending order first column B, then C, then D, then E, then F. I don't have any problem with sorting these selected ranges individually. But I need your help on sorting them all in one go.

Thanks and Regards
 

Attachments

  • Sample File without merged cells .xls
    14 KB · Views: 6
Back
Top