+ Reply to Thread
Results 1 to 7 of 7

Sorting a Dynamic List of Data

  1. #1
    Forum Contributor
    Join Date
    02-08-2005
    MS-Off Ver
    Microsoft 365
    Posts
    812

    Sorting a Dynamic List of Data

    Hi,

    I have data in the attached file arranged as follows:

    "Source Data" sheet
    Data in columns A to L will be updated daily by pasting from another workbook. On any given day the data in columns A to L may have more or fewer rows than the day before.

    "Lookup Table" sheet
    The aim is to return the data from the "Source Data" sheet; the selection depends on the Data Validation choice in cell O1.

    I would like to be able to sort this dynamic list of data - ideally by clicking a single button - in descending order of the values in column L.

    Can someone please suggest a solution?

    Thanks!
    Attached Files Attached Files

  2. #2
    Forum Expert newdoverman's Avatar
    Join Date
    02-07-2013
    Location
    Port Dover, Ontario, Canada
    MS-Off Ver
    2010
    Posts
    10,330

    Re: Sorting a Dynamic List of Data

    Why not just use a filter on the Source Data? That way you can filter to get the records that you want and you can sort the results. The lookup table really isn't necessary as the same results can easily be obtained from the source data using the Filter facility of Excel.
    <---------If you like someone's answer, click the star to the left of one of their posts to give them a reputation point for that answer.
    Ron W

  3. #3
    Forum Expert ben_hensel's Avatar
    Join Date
    01-26-2012
    Location
    Northeast USA
    MS-Off Ver
    Office 365
    Posts
    2,043

    Re: Sorting a Dynamic List of Data

    If you're already pasting from another workbook, then I would just "Format as Table" immediately after you've pasted the selection in.

    Then you can Filter column N to only display "Non Lagged" and Sort column L Small=>Large.

    In any case, my instinct is that Sort/Filter tools are the way to go here, rather than formula: you can easily manipulate to the output you want without having to mess around with lookup tables.

  4. #4
    Forum Contributor
    Join Date
    02-08-2005
    MS-Off Ver
    Microsoft 365
    Posts
    812

    Re: Sorting a Dynamic List of Data

    Thank you for the helpful responses.

    The Lookup Table is necessary because some calculations are made on the data that's pasted into the Source Data sheet (see, for example, column F in the Lookup Table), so it's not just a case of filtering the Source Data.

    If you can suggest a better solution that mine I'd be very grateful

    Thanks!

  5. #5
    Forum Expert ben_hensel's Avatar
    Join Date
    01-26-2012
    Location
    Northeast USA
    MS-Off Ver
    Office 365
    Posts
    2,043

    Re: Sorting a Dynamic List of Data

    Could you just copy/paste those formulas onto the right side of the input copypasta and slap them in the table, too?

  6. #6
    Forum Expert newdoverman's Avatar
    Join Date
    02-07-2013
    Location
    Port Dover, Ontario, Canada
    MS-Off Ver
    2010
    Posts
    10,330

    Re: Sorting a Dynamic List of Data

    You don't say where the data in column F comes from so unless the process that produced that data is known, a useful solution isn't likely.

  7. #7
    Registered User
    Join Date
    01-10-2014
    Location
    United States
    MS-Off Ver
    Excel 2016
    Posts
    18

    Re: Sorting a Dynamic List of Data

    In column N of the lookup table use a Rank.EQ function. So in N2 you'd have =IF(L2="","",RANK.EQ(L2,OFFSET($L$2,0,0,COUNT($L$2:$L$10)),0)) and copy it down to N10 or however many rows your dataset is ever likely to produce.

    Now you can use INDEX in a separate table area to create a table that's always sorted.
    Attached Files Attached Files

+ 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 Data in Dynamic Ranges
    By andrewc in forum Excel General
    Replies: 2
    Last Post: 02-07-2014, 08:13 AM
  2. Sorting Dynamic Data
    By vt2009 in forum Excel General
    Replies: 1
    Last Post: 04-28-2012, 10:18 PM
  3. Multi Row Sorting & Create Header Row from Dynamic List
    By drew138 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 04-06-2009, 03:39 PM
  4. Dynamic List Sorting
    By icupat in forum Excel General
    Replies: 3
    Last Post: 06-02-2007, 09:33 AM
  5. Lookup / Dynamic sorting of data
    By csiunatc in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 05-26-2007, 08:58 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