+ Reply to Thread
Results 1 to 26 of 26

how to sort data into ordered array

  1. #1
    Registered User
    Join Date
    04-17-2010
    Location
    Australia
    MS-Off Ver
    Excel 2010
    Posts
    38

    how to sort data into ordered array

    I have the following data, how can I sort them into ordered array?
    Attached Images Attached Images
    Last edited by warakawa; 10-20-2010 at 03:13 AM.

  2. #2
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: how to sort data into ordered array

    An image is not great - just put the values in a sample file and attach it.

    In the sample please also outline the "after" view - you don't stipulate how you wish to sort (horizontal, vertical etc...)

  3. #3
    Registered User
    Join Date
    04-17-2010
    Location
    Australia
    MS-Off Ver
    Excel 2010
    Posts
    38

    Re: how to sort data into ordered array

    what do you mean by sample file? Do you mean I save the data onto an Excel file and attach it?

    I want to after view to have the same dimension as the original data dimension, which is A to J and 1 to 5.
    Microsoft Excel 2010 32-bit and Windows 7 64-bit on Thinkpad X200T

  4. #4
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: how to sort data into ordered array

    Create a sample workbook with BEFORE and AFTER sheets showing the need and the goal.

    Click GO ADVANCED and use the paperclip icon to post up your workbook.
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

  5. #5
    Registered User
    Join Date
    04-17-2010
    Location
    Australia
    MS-Off Ver
    Excel 2010
    Posts
    38

    Re: how to sort data into ordered array

    Quote Originally Posted by JBeaucaire View Post
    Create a sample workbook with BEFORE and AFTER sheets showing the need and the goal.

    Click GO ADVANCED and use the paperclip icon to post up your workbook.
    what is sample workbook? Is it a excel file or jpeg or what? I am a noob, please use non jargon.

    If sameple workbook is an excel file, how can I show you after sheets when I don't know how to do it?
    Last edited by warakawa; 10-20-2010 at 03:31 AM.

  6. #6
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: how to sort data into ordered array

    If you don't know that a workbook is an Excel file, then maybe you don't know enough of even the basics to be attempting this. I'm not trying to be mean, just frank. The simplest of "jargon" must be in your vocabulary if we're even to have a meaningful discussion about Excel.

    If sample workbook is an excel file,
    ....it is....


    how can I show you after sheets when I don't know how to do it?
    We don't know what you want when you show us pictures of sample data and say "sort this into an array". That could mean anything, especially coming from someone who doesn't know that a workbook is an Excel file.

    So, we want you to SHOW us by creating two worksheets in your workbook, one is BEFORE...basically the table you gave before in your picture, but this time in an Excel sheet so we can see and use it as we try to help you.

    The second sheet is AFTER and you manually layout your desired "sorted array" so we can see what you're talking about. We know you don't know how to do it automatically, but certainly you know what your end result needs to be, else how will anyone know if we are answering your question correctly?

  7. #7
    Registered User
    Join Date
    04-17-2010
    Location
    Australia
    MS-Off Ver
    Excel 2010
    Posts
    38

    Re: how to sort data into ordered array

    Thanks for the tip, I will know what a workbook is in the future.

    I have attached the before and after workbook.

    Thanks.
    Attached Files Attached Files

  8. #8
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: how to sort data into ordered array

    You can use the SMALL() function to order these values since you don't mind duplicate values.

    On your BEFORE sheet...pick an empty cell lower down in column A (like cell A8) and enter this formula:

    =SMALL($A$1:$J$5,COLUMN(A1)+((ROW(A1)-1)*10))

    Now copy that cell down and across into a range of cells the same size as your original table.

  9. #9
    Registered User
    Join Date
    04-17-2010
    Location
    Australia
    MS-Off Ver
    Excel 2010
    Posts
    38

    Re: how to sort data into ordered array

    is there a way to it without using formula? I would like to use buttons on the ribbon. Formula is scary, it is impossible for me to remember the forumla.

    I did what you said, it come out like this
    Attached Images Attached Images
    Last edited by warakawa; 10-20-2010 at 04:52 AM.

  10. #10
    Valued Forum Contributor squiggler47's Avatar
    Join Date
    02-17-2009
    Location
    Littleborough, UK
    MS-Off Ver
    Excel 3.0 to 2007+2010! (couldnt get 2.1 working)
    Posts
    1,013

    Re: how to sort data into ordered array

    Highlight the values you want to sort, and go to the data tab on the ribbon, select sort A-Z and it will sort them in place, the only problem is your format it will sort each column in order rather than the entire table
    Regards
    Darren

    Update 12-Nov-2010 Still job hunting!

    If you are happy with the results, please add to our reputation by clicking the blue scales icon in the blue bar of the post.

    Learn something new each day, Embrace change do not fear it, evolve and do not become extinct!


  11. #11
    Registered User
    Join Date
    04-17-2010
    Location
    Australia
    MS-Off Ver
    Excel 2010
    Posts
    38

    Re: how to sort data into ordered array

    maybe I have to enter the data vertically and get the result vertically too.

  12. #12
    Valued Forum Contributor squiggler47's Avatar
    Join Date
    02-17-2009
    Location
    Littleborough, UK
    MS-Off Ver
    Excel 3.0 to 2007+2010! (couldnt get 2.1 working)
    Posts
    1,013

    Re: how to sort data into ordered array

    Vertical is the best way!

    Excel is designed to work best with data horizontal or vertical, a nice tip to make this process easier if you are going to be adding data :-

    Type DATA in cell A1
    higlight A1 and A2, press CTRL-L, then check the box my table has headers

    you can now type your values starting at A2 down to wherever (always start in the next empty space)

    You can now sort using the dropdown box on the header, and filter on items like the top 10 values etc

  13. #13
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: how to sort data into ordered array

    Or you could do what I said. Put the formula in A8 and copy down and across to A8:J12. You skipped row 8 and 9 for some reason in your pictured example.

  14. #14
    Registered User
    Join Date
    04-17-2010
    Location
    Australia
    MS-Off Ver
    Excel 2010
    Posts
    38

    Re: how to sort data into ordered array

    how come you guys did not mension "sort & filter" button? That's exactly what I needed.

  15. #15
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: how to sort data into ordered array

    Quote Originally Posted by warakawa
    How come you guys did not mension "sort & filter" button? That's exactly what I needed.
    Well, no, given your sample data it clearly wasn't.

    Had you provided a completely different sample (ie a vector as opposed to a matrix) then I'm pretty sure JB would have mentioned it.

  16. #16
    Registered User
    Join Date
    04-17-2010
    Location
    Australia
    MS-Off Ver
    Excel 2010
    Posts
    38

    Re: how to sort data into ordered array

    I assume vector means vertically?

  17. #17
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: how to sort data into ordered array

    single column or single row

  18. #18
    Valued Forum Contributor squiggler47's Avatar
    Join Date
    02-17-2009
    Location
    Littleborough, UK
    MS-Off Ver
    Excel 3.0 to 2007+2010! (couldnt get 2.1 working)
    Posts
    1,013

    Re: how to sort data into ordered array

    Quote Originally Posted by squiggler47 View Post
    Vertical is the best way!

    Excel is designed to work best with data horizontal or vertical, a nice tip to make this process easier if you are going to be adding data :-

    Type DATA in cell A1
    higlight A1 and A2, press CTRL-L, then check the box my table has headers

    you can now type your values starting at A2 down to wherever (always start in the next empty space)

    You can now sort using the dropdown box on the header, and filter on items like the top 10 values etc
    I believe that here I did tell you about sort and filter!!!!!!!!

    and previously I told you how to sort manually!

    This is the easier way to set up sort and filter for a range!!

  19. #19
    Registered User
    Join Date
    04-17-2010
    Location
    Australia
    MS-Off Ver
    Excel 2010
    Posts
    38

    Re: how to sort data into ordered array

    you read your post, but I didn't understand your post.I had to go through a business statistic book.

    Can anyone tell me why subscription is not working, I am not getting any email notifications.

  20. #20
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: how to sort data into ordered array

    Quote Originally Posted by warakawa View Post
    Can anyone tell me why subscription is not working, I am not getting any email notifications.
    You have asked the above in another thread - I'd suggested sticking to the other thread.

    Thanks,

  21. #21
    Registered User
    Join Date
    04-17-2010
    Location
    Australia
    MS-Off Ver
    Excel 2010
    Posts
    38

    Re: how to sort data into ordered array

    I just thought this sub forum might have a bit more traffic and maybe someone have encountered the same problem might be able to help me out. But you are right, I should stick to the other thread, just have to come back often to check the threads I guess.

  22. #22
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: how to sort data into ordered array

    Whilst you await resolution to your email issue... you can via Quick Links etc get a listing of threads you're subscribed to
    (also via your UserCP you would normally have a list appear of threads active in your session that you are subscribed to)

  23. #23
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: how to sort data into ordered array

    DO is right, always use the UserCP link on the menu bar at the top to start your session. I even have the resulting URL on my computer as the forum link so I always start there.

  24. #24
    Registered User
    Join Date
    04-17-2010
    Location
    Australia
    MS-Off Ver
    Excel 2010
    Posts
    38

    Re: how to sort data into ordered array

    so the subscription works for you guys right? I just want to know if it's my problem or an issue with this forum.

    Thanks.

  25. #25
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: how to sort data into ordered array

    as discussed this question is not relevant to this thread.

  26. #26
    Registered User
    Join Date
    04-17-2010
    Location
    Australia
    MS-Off Ver
    Excel 2010
    Posts
    38

    Re: how to sort data into ordered array

    Quote Originally Posted by DonkeyOte View Post
    as discussed this question is not relevant to this thread.
    You are right, this is not relevant to this thread, however it is relevant to this thread

    http://www.excelforum.com/the-water-...t-working.html

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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