Tuesday, October 11, 2011

How to sort columns by rows in Excel and Libreoffice Calc

Excel and Openoffice/Libreoffice Calc have a function sort that will sort rows by the column you select.

In case one wants e.g. to sort the table bellow by sorting columns according to the row 1:

NHD    T2D    NHD    T2D    NHD    T2D    NHD    T2D
                          
7    3    4    7    0    14    8    5
17    12    9    14    13    10    18    13
3    0    3    3    0    2    2    0
1    0    0    0    0    0    0    1
2    0    0    0    1    0    0    0
1    1    1    3    4    2    0    0

In Libreoffice Calc:

Data/Sort
Options/Direction/Left to right (sort columns)
Sort criteria/Sort by/select the row you want

The output is sorted table:

NHD    NHD    NHD    NHD    T2D    T2D    T2D    T2D
                           
7    4    0    8    3    7    14    5
17    9    13    18    12    14    10    13
3    3    0    2    0    3    2    0
1    0    0    0    0    0    0    1
2    0    1    0    0    0    0    0
1    1    4    0    1    3    2    0

12 comments:

  1. I feel really happy to have seen your webpage and look forward to so many more entertaining times reading here. Thanks once more for all the details.

    Data Science Training in Bangalore

    ReplyDelete
  2. I read Many Post about Excel and Other Courses but I really Impressed about your Writing Way and How to Express to words.. It’s really helpful for us Thanks for sharing,, keep writing
    Advanced excel training in delhi
    Advanced excel training in Noida
    Advanced excel training in Gurgaon

    ReplyDelete
  3. Wonderful Blog, great blog post that you have provided for peoples. Its really good. Nice information.


    Data Science Courses in Bangalore

    ReplyDelete
  4. You completely match our expectation and the variety of our information.
    Data Science Course in Pune

    ReplyDelete
  5. I need to to thank you for this very good read!! I definitely loved every little bit of it. I have you bookmarked to check out new things you post…
    AI learning course malaysia

    ReplyDelete
  6. I wanted to leave a little comment to support you and wish you a good continuation. Wishing you the best of luck for all your blogging efforts.

    Data Science Course

    ReplyDelete
  7. I just got to this amazing site not long ago. I was actually captured with the piece of resources you have got here. Big thumbs up for making such wonderful blog page digital marketing course in singapore

    ReplyDelete
  8. This is also a very good post which I really enjoyed reading. It is not every day that I have the possibility to see something like this..
    I love it thanks fo sharing.

    ReplyDelete
  9. I am really enjoying reading your well written articles. It looks like you spend a lot of effort and time on your blog. I have bookmarked it and I am looking forward to reading new articles. Keep up the good work.
    Love it, Thanks For Sharing.

    ReplyDelete
  10. I just got to this amazing site not long ago. I was actually captured with the piece of resources you have got here. Big thumbs up for making such wonderful blog page! digital marketing course in singapore

    ReplyDelete