+ Reply to Thread
Results 1 to 8 of 8

Creating a dynamic descending list with duplicate values

  1. #1
    Registered User
    Join Date
    09-08-2021
    Location
    Michigan, United States
    MS-Off Ver
    Microsoft 365
    Posts
    4

    Exclamation Creating a dynamic descending list with duplicate values

    Any help would be tremendously appreciated. I am on hour 2 of trying to figure this out.

    An example:

    Tab 1:

    Job # Job Revenue Job Cost Job Status Job Mat Spend
    23 / 100 / 80 / Closed / 20
    42 / 200 / 150 / Active / 10
    56 / 100 / 90 / Active / 30
    71 / 150 / 30 / Active / 40
    83 / 100 / 85 / Active / 40
    I have around 5,000 rows of this type of information.

    I would like to create a dynamic list in descending order (of Job Revenue) of each of these jobs with their respective job information. The issue I am having is when I create a list like this using a combination of index match large if, ect. The duplicate values will return the first occurrence of that value. I also need to exclude any closed jobs.

    What I am getting now with my "INDEX(Pivot_Table[Job_No.],MATCH(LARGE(IF(Pivot_Table[job_status]="A",Pivot_Table[Job_Revenue]),ROWS('Sheet 1'!$B$2:$B2)),Pivot_Table[Job_Revenue],0),0)" function:



    Job # Job Revenue Job Cost Job Status Job Mat Spend
    42 / 200 / 150 / Active / 10
    71 / 150 / 30 / Active / 40
    56 / 100 / 90 / Active / 30
    56 / 100 / 90 / Active / 30


    What I am looking for:



    Job # Job Revenue Job Cost Job Status Job Mat Spend
    42 / 200 / 150 / Active / 10
    71 / 150 / 30 / Active / 40
    56 / 100 / 90 / Active / 30
    83 / 100 / 85 / Active / 40
    Last edited by jwills7; 09-09-2021 at 09:53 AM.

  2. #2
    Forum Expert XLent's Avatar
    Join Date
    10-13-2010
    Location
    Northumberland, UK
    MS-Off Ver
    various
    Posts
    2,704

    Re: Creating a dynamic descending list with duplicate values

    post a sample file (follow banner at top of the page for instructions as the "paperclip" doesn't work!)

    in short, given O365, you can use FILTER and SORT to do this for you - without needing to use a complex Array, e.g:
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    the above would generate your 4 rows per final table

    the above, adapted in reference to your existing formula would look something like:
    Formula: copy to clipboard
    Please Login or Register  to view this content.

  3. #3
    Registered User
    Join Date
    09-08-2021
    Location
    Michigan, United States
    MS-Off Ver
    Microsoft 365
    Posts
    4

    Re: Creating a dynamic descending list with duplicate values

    For some reason, I just received the spill error when applying this function. My Job Revenue data is in Column M. and the data is from Column A to Column AL.

  4. #4
    Forum Expert XLent's Avatar
    Join Date
    10-13-2010
    Location
    Northumberland, UK
    MS-Off Ver
    various
    Posts
    2,704

    Re: Creating a dynamic descending list with duplicate values

    You will get a #SPILL! error if the cells (into which the results should populate) are already populated -- i.e. clear the "results" range, then put the formula in (this is a one-time, thing)

    If you don't want all the columns returned (from source) we will need a little more info as to which you do want, whether they are contiguous in the table and, if not, in which column position they appear in the table

  5. #5
    Registered User
    Join Date
    09-08-2021
    Location
    Michigan, United States
    MS-Off Ver
    Microsoft 365
    Posts
    4

    Re: Creating a dynamic descending list with duplicate values

    Got it. So in this case, I would only like to pull in the job number (Column C). But I want it to be in descending order of job revenue size(Column M). I dont want to pull in any of the other information.

  6. #6
    Forum Expert XLent's Avatar
    Join Date
    10-13-2010
    Location
    Northumberland, UK
    MS-Off Ver
    various
    Posts
    2,704

    Re: Creating a dynamic descending list with duplicate values

    ah, in that case ... you could use something like:

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

    above would sort the Active records by Col 13 (M) in Desc order, and return the 3rd column (C) of resulting dataset

  7. #7
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,777

    Re: Creating a dynamic descending list with duplicate values

    Administrative Note:

    Welcome to the forum.

    We would very much like to help you with your query, however it has been brought to our attention that the same query has been posted on one or more other forums and you have not provided the required cross-post link(s) here.

    Please see Forum Rule #3 about cross-posting and adjust accordingly. Read this to understand why we (and other sites like us) consider this to be important.

    (Note: this requirement is not optional. As you are new here, I will do it for you today: https://www.mrexcel.com/board/thread...alues.1181404/.)
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  8. #8
    Registered User
    Join Date
    09-08-2021
    Location
    Michigan, United States
    MS-Off Ver
    Microsoft 365
    Posts
    4

    Re: Creating a dynamic descending list with duplicate values

    You simply cannot understand how grateful I am. Thank you so much for your help. DM me your venmo please!

+ 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. [SOLVED] Creating a List With 2 Criteria and Allowing Duplicate Return Values
    By Ekazumon in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 10-05-2020, 01:37 AM
  2. [SOLVED] Populate a descending list of values with the corresponding name
    By bdoguc in forum Excel Formulas & Functions
    Replies: 10
    Last Post: 12-30-2019, 02:24 PM
  3. Remove duplicate values in a dynamic list
    By pedrosky1061012 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 04-04-2014, 12:15 PM
  4. [SOLVED] VBA for creating dropdown list from dynamic multiple values lookup
    By costin in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 04-29-2013, 05:39 PM
  5. Sorting in descending order and show duplicate values
    By cceze in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 10-19-2012, 09:33 AM
  6. [SOLVED] Look for values in a list, count and list in descending order
    By sans in forum Excel Programming / VBA / Macros
    Replies: 32
    Last Post: 05-15-2012, 09:16 AM
  7. how to create a dynamic descending list of months & years
    By marika1981 in forum Excel General
    Replies: 7
    Last Post: 02-19-2005, 12:06 AM

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