+ Reply to Thread
Results 1 to 10 of 10

Sorting Values Within a Number of Columns

  1. #1
    Forum Contributor
    Join Date
    04-15-2016
    Location
    Gold Coast Australia
    MS-Off Ver
    Microsoft Office Professional Plus 2021
    Posts
    147

    Sorting Values Within a Number of Columns

    I have data in a worksheet as follows -

    ORDER REGION SUB AREA NUMBER VALUE
    1 NORTH 7 10 10
    2 NORTH 7 5 9
    3 NORTH 7 12 7
    4 NORTH 7 9 6
    5 SOUTH 8 11 5
    6 SOUTH 8 3 4
    7 SOUTH 8 1 8
    8 SOUTH 8 9 10
    9 EAST 8 4 3
    10 EAST 8 5 6
    11 EAST 8 11 8
    12 EAST 8 7 7

    Is it possible to get this result (having the Values sorted from Largest to Smallest)

    without manually selecting the 4 rows of NORTH and Data Sort of VALUE,

    then manually selecting the 4 rows of SOUTH as above

    And finally the 4 rows of EAST..

    To obtain this result (Values sorted within the REGION)

    ORDER REGION SUB AREA NUMBER VALUE
    1 NORTH 7 10 10
    2 NORTH 7 5 9
    3 NORTH 7 12 7
    4 NORTH 7 9 6
    8 SOUTH 8 9 10
    7 SOUTH 8 1 8
    5 SOUTH 8 11 5
    6 SOUTH 8 3 4
    11 EAST 8 11 8
    12 EAST 8 7 7
    10 EAST 8 5 6
    9 EAST 8 4 3
    Attached Files Attached Files

  2. #2
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    25,426

    Re: Sorting Values Within a Number of Columns

    You can introduce another column (F) and allocate values according to the region, i.e. 1 for North, 2 for South and 3 for East - use a suitable header for this column (e.g. Region_2). Then select the whole table and choose Sort on the Data menu, using Region_2 as the first sort field (smallest to largest) and Value as the second sort field (Largest to Smallest). You can delete column F when you are done.

    Hope this helps.

    Pete

  3. #3
    Forum Contributor
    Join Date
    04-15-2016
    Location
    Gold Coast Australia
    MS-Off Ver
    Microsoft Office Professional Plus 2021
    Posts
    147

    Re: Sorting Values Within a Number of Columns

    Hi Pete,

    I tried to assign a number to the regions as you suggested using =lookup formula but I get #N/A as a value

    Uploaded the worksheet again.

    I followed a video exactly - not sure what went wrong.

    I made sure none of the cells were locked.

    Thanks in advance if you come back

    Cheers Doug
    Attached Files Attached Files

  4. #4
    Forum Guru
    Join Date
    09-10-2017
    Location
    Chippenham, England
    MS-Off Ver
    365
    Posts
    15,789

    Re: Sorting Values Within a Number of Columns

    How about using
    =VLOOKUP(H2,$A$16:$B$18,2,0)

  5. #5
    Forum Contributor
    Join Date
    04-15-2016
    Location
    Gold Coast Australia
    MS-Off Ver
    Microsoft Office Professional Plus 2021
    Posts
    147

    Re: Sorting Values Within a Number of Columns

    Thanks Fluff, worked perfectly, never would have worked that out by myself.

  6. #6
    Forum Guru
    Join Date
    09-10-2017
    Location
    Chippenham, England
    MS-Off Ver
    365
    Posts
    15,789

    Re: Sorting Values Within a Number of Columns

    Glad to help & thanks for the feedback

  7. #7
    Forum Contributor
    Join Date
    04-15-2016
    Location
    Gold Coast Australia
    MS-Off Ver
    Microsoft Office Professional Plus 2021
    Posts
    147

    Re: Sorting Values Within a Number of Columns

    Wonder if I could impose with another question...

    Is it possible to get this

    2019-10-22_22-51-49.jpg

    to this at all

    2019-10-22_22-52-57.jpg

    Then I could sort the different sub areas as per your previous help

    2019-10-22_22-59-19.jpg

    Reuploaded sheet with suggestions.
    Attached Files Attached Files

  8. #8
    Forum Guru
    Join Date
    09-10-2017
    Location
    Chippenham, England
    MS-Off Ver
    365
    Posts
    15,789

    Re: Sorting Values Within a Number of Columns

    How about
    =O2&P2

  9. #9
    Forum Contributor
    Join Date
    04-15-2016
    Location
    Gold Coast Australia
    MS-Off Ver
    Microsoft Office Professional Plus 2021
    Posts
    147

    Re: Sorting Values Within a Number of Columns

    Palm slap to the head - I have never seen that formula with the & before .

    Thanks so much.

  10. #10
    Forum Guru
    Join Date
    09-10-2017
    Location
    Chippenham, England
    MS-Off Ver
    365
    Posts
    15,789

    Re: Sorting Values Within a Number of Columns

    You're welcome & thanks for the feedback

+ 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. Sorting Ranges with Text Values and Number Values using Formula
    By oudavid1 in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 09-27-2017, 03:05 PM
  2. [SOLVED] Sorting columns by letter if they start with number first
    By jambog in forum Excel General
    Replies: 5
    Last Post: 03-21-2016, 03:15 PM
  3. sorting columns based on row criteria, with variable number of columns
    By bardobhb in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 09-02-2014, 04:02 PM
  4. [SOLVED] Need help sorting data in columns that will sort by number of Xs
    By brenna.at.work in forum Excel General
    Replies: 7
    Last Post: 04-03-2014, 07:17 PM
  5. [SOLVED] Sorting more than 3 columns of number
    By mymanmo in forum Excel General
    Replies: 3
    Last Post: 11-26-2012, 06:31 PM
  6. Sorting columns by number?
    By ufoldager in forum Excel General
    Replies: 7
    Last Post: 02-29-2012, 05:34 AM
  7. sorting two columns and write the sorted values on two columns in a different sheet
    By virsojour in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 11-22-2010, 04:38 AM

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