+ Reply to Thread
Results 1 to 15 of 15

Automatically Ordering an Irregular Table

  1. #1
    Registered User
    Join Date
    03-17-2019
    Location
    Madrid
    MS-Off Ver
    2017
    Posts
    12

    Automatically Ordering an Irregular Table

    problem.jpg

    I want to order these sections depends on percentage values on D2 columns. The idea is "Biggest goes top". But the group of cells include pictures and irregular rows columns. How can i do that?

  2. #2
    Forum Expert
    Join Date
    06-08-2012
    Location
    Left the forum!
    MS-Off Ver
    Left the forum!
    Posts
    5,189

    Re: Automatically Ordering an Irregular Table

    Try entering this formula into A3, then fill down to include the first empty row below the last section (so in the picture for 4 groups, you would fill down to A30).

    Formula: copy to clipboard
    Please Login or Register  to view this content.


    Then select A3:D3 and sort by Column A values, largest to smallest.

    For aesthetic purposes, you could hide the formula in column A by using a white font.

  3. #3
    Registered User
    Join Date
    03-17-2019
    Location
    Madrid
    MS-Off Ver
    2017
    Posts
    12

    Re: Automatically Ordering an Irregular Table

    Thanks for answering but it didnt work. I have to say that when put new datas on the table right side, left side section has to be change automatically. Actually, my left side section is not a table. There is no relation between pics and values. How can i make group them? Is it more convenient to work on another sheet? If you have any idea please answer me!

  4. #4
    Forum Expert
    Join Date
    06-08-2012
    Location
    Left the forum!
    MS-Off Ver
    Left the forum!
    Posts
    5,189

    Re: Automatically Ordering an Irregular Table

    It worked fine for me in a quick test. There may be things in your file that cannot be seen from a picture which are causing it to behave differently for you.

    Please attach a copy of your workbook with any personal / confidential data fictionalised, or removed if it is not relevant to the question. To do this, click the 'Go Advanced' button below the quick reply window, then scroll down and look for the 'Manage Attachments' link.

    If the percentages in column D are the result of formulas, then you would need to leave the formulas and the data that they are generated from in the file. I suspect that this could be the reason why it is not working for you.

    Because you have pictures, you will not be able to sort with formulas alone, you will need a formula like the one I have already suggested to index the pictures and the rows that they relate to. You will need to sort manually or use vba.

  5. #5
    Registered User
    Join Date
    03-17-2019
    Location
    Madrid
    MS-Off Ver
    2017
    Posts
    12

    Re: Automatically Ordering an Irregular Table

    Please find attached xlsx file.
    Attached Files Attached Files

  6. #6
    Forum Expert
    Join Date
    06-08-2012
    Location
    Left the forum!
    MS-Off Ver
    Left the forum!
    Posts
    5,189

    Re: Automatically Ordering an Irregular Table

    One thing that I missed in your picture was the merged cells in various columns.

    In order to be able to sort anything all cells in the range to be sorted must be of equal size. To the best of my knowledge, there is no workaround for this.

    I'm going to look at a couple of things in more detail to see if there is an alternative method which can be used. If not you might need to make some slight changes to the sheet design.

  7. #7
    Registered User
    Join Date
    03-17-2019
    Location
    Madrid
    MS-Off Ver
    2017
    Posts
    12

    Re: Automatically Ordering an Irregular Table

    thanks, i'm trying to it on new sheet. I am also wondering auto ordering VBA Code. Do you know anything about for this?

  8. #8
    Forum Expert
    Join Date
    06-08-2012
    Location
    Left the forum!
    MS-Off Ver
    Left the forum!
    Posts
    5,189

    Re: Automatically Ordering an Irregular Table

    I think that the merged cells would still be a problem there.

    I think that I have found a solution with formulas, just need to finish putting it together and test it.

  9. #9
    Forum Expert
    Join Date
    06-08-2012
    Location
    Left the forum!
    MS-Off Ver
    Left the forum!
    Posts
    5,189

    Re: Automatically Ordering an Irregular Table

    Ok, this has proven to be a bit of a complex task, to start with I had to remove the existing pictures.

    Next I changed the formulas in columns C and D so that the highest value is always at the top, also I added another formula into the merged cells in columns C&D which finds the correct name to match the associated values.

    Next I added the pictures back in to row 70, so that each is in the column with the correct name at the top.

    Finally, I used a lot of named ranges to link thise picture back to column B so that everything appears where it should. Rather than me explaining the whole process, this link details the steps that I followed, https://excel.tips.net/T003128_Displ..._a_Result.html with the exceptions being:-

    Step 1, used same sheet, not new sheet.
    Step 6, different formula, the formula in C3, C10, etc replaces this.
    Step 8 onwards, where the guide only details a single 'Picture' name, I had to use a new name for each picture to be displayed.

    Had to zip the file, for some reason it has increased significantly in size. Possible due to trial and error making the pictures fit resulting in multiple deleted images leaving some bloat in the file. Will have another look tomorrow, see if I can clean it up a bit.

    This should be enough for you to see if it works as expected.
    Attached Files Attached Files

  10. #10
    Registered User
    Join Date
    03-17-2019
    Location
    Madrid
    MS-Off Ver
    2017
    Posts
    12

    Re: Automatically Ordering an Irregular Table

    It works amazing! I very appreciate to you. I'm trying to getting understand everything. And last questions, maybe I need to ask in other Header, but i want to learn from you, Is there any option to fix this cells which on B:D columns as always visible?

  11. #11
    Forum Expert
    Join Date
    06-08-2012
    Location
    Left the forum!
    MS-Off Ver
    Left the forum!
    Posts
    5,189

    Re: Automatically Ordering an Irregular Table

    Sorry, I don't understand what you're asking for

    If you can create what you want manually, a before and after example would help.

  12. #12
    Registered User
    Join Date
    03-17-2019
    Location
    Madrid
    MS-Off Ver
    2017
    Posts
    12

    Re: Automatically Ordering an Irregular Table

    Sorry for being so late. I uploaded an image. I want to keep always visible left side and i need to be able to scroll right side. I hope this will be clear.
    Attachment 624413

    Thank you!

  13. #13
    Forum Expert
    Join Date
    06-08-2012
    Location
    Left the forum!
    MS-Off Ver
    Left the forum!
    Posts
    5,189

    Re: Automatically Ordering an Irregular Table


  14. #14
    Registered User
    Join Date
    03-17-2019
    Location
    Madrid
    MS-Off Ver
    2017
    Posts
    12

    Re: Automatically Ordering an Irregular Table

    No, its not working for me because I want to fix left side and first row too

    You can see here:
    GWoVeTg.jpg

  15. #15
    Forum Expert
    Join Date
    06-08-2012
    Location
    Left the forum!
    MS-Off Ver
    Left the forum!
    Posts
    5,189

    Re: Automatically Ordering an Irregular Table

    You can lock the top row(s) while scrolling up and down.

    You can lock the left column(s) while scrolling left and right.

    You can not stop the left column(s) scrolling up and down with the right column(s).

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Re-ordering a pivot table
    By didierkassas in forum Excel Charting & Pivots
    Replies: 1
    Last Post: 03-07-2018, 03:25 AM
  2. VBA Ordering User form for Purchase Ordering.
    By caf20012 in forum Excel Programming / VBA / Macros
    Replies: 14
    Last Post: 01-10-2014, 01:50 PM
  3. [SOLVED] Ordering chronologically in a pivot table
    By Falc in forum Excel Charting & Pivots
    Replies: 12
    Last Post: 07-30-2013, 09:11 AM
  4. Replies: 3
    Last Post: 10-22-2010, 09:15 AM
  5. Chart jagged, irregular data - maybe a pivot table?
    By pmdprt in forum Excel General
    Replies: 6
    Last Post: 09-09-2010, 03:44 AM
  6. sorting slightly irregular date fields in a pivot table
    By tdoggette in forum Excel General
    Replies: 1
    Last Post: 07-21-2009, 08:56 AM
  7. Loop-copy irregular columns values to new table
    By leonnord in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 07-29-2007, 06:54 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1