+ Reply to Thread
Results 1 to 6 of 6

list returns?

  1. #1
    Registered User
    Join Date
    10-27-2017
    Location
    Illinois
    MS-Off Ver
    2013
    Posts
    12

    list returns?

    I'm aware that excel has some list functionality, though unsure if they can function in my example. I have my Magic: The Gathering card inventory stored in a spreadsheet.

    Column A represents the name of the card. The same value can appear in this column multiple times as cards have been reprinted over the years. Column B is the name of the set in which the card was printed in. So for example, a value in Column A could appear four different times, always having a different value in Column B. A different value in column A may have only been printed one time, thus having only one value in Column B.

    I have broken the values of Column B into three lists, for now we'll call them 1, 2 and 3. Using the example of the column A entry appearing four times and having four different values in column B, let's say the list the Column B entries are on are, respectively, List 1, List 2, List 1, List 3. What I would like excel to do rather than spit out the return for the four rows like this is give me the highest list any of the four appear in, so I'd like it to return List 3 for all four rows with the same value in Column A.
    Attached Files Attached Files
    Last edited by SineNomine; 04-22-2018 at 11:09 AM.

  2. #2
    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,916

    Re: list returns?

    Will you please attach a sample Excel workbook? We are not able to work with or manipulate a picture of one and nobody wants to have to recreate your data from scratch.

    1. Make sure that your sample data are REPRESENTATIVE of your real data. The use of unrepresentative data is very frustrating and can lead to long delays in reaching a solution.

    2. Make sure that your desired results are also shown (mock up the results manually).

    3. Make sure that all confidential data is removed or replaced with dummy data first (e.g. names, addresses, E-mails, etc.).

    4. Try to avoid using merged cells as they cause lots of problems.

    Unfortunately the attachment icon doesn't work at the moment, so to attach an Excel file you have to do the following: just before posting, scroll down to Go Advanced and then scroll down to Manage Attachments. Now follow the instructions at the top of that screen.

    Please pay particular attention to point 2 (above): without an idea of your intended outcomes, it is often very difficult to offer appropriate advice.
    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.

  3. #3
    Registered User
    Join Date
    10-27-2017
    Location
    Illinois
    MS-Off Ver
    2013
    Posts
    12

    Re: list returns?

    okay, uploaded some sample data with mocked up expected results in column C.

  4. #4
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,063

    Re: list returns?

    One possibility, with an array formula in C2, copied down:

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


    Array Formulae are a little different from ordinary formulae in that they MUST be confirmed in the FIRST CELL ONLY by pressing CTRL+SHIFT+ENTER to activate the array, not just ENTER. After that, the array can be dragged down as normal, to cover the desired range.

    You will know the array is active when you see curly brackets { } - or "curly braces" for those of you in the USA, or "flower brackets" for those of you in India - appear around the outside of your formula. If you do not use CTRL+SHIFT+ENTER you will (almost always) get an error message or an incorrect answer. Press F2 on that cell and try again.

    Don't type the curly brackets yourself - it won't work...
    Attached Files Attached Files
    Glenn




    None of us get paid for helping you... we do this for fun. So DON'T FORGET to say "Thank You" to all who have freely given some of their time to help YOU.

    Temporary addition of accented to illustrate ongoing problem to the TT: L? fh?ile P?draig sona dhaoibh

  5. #5
    Registered User
    Join Date
    10-27-2017
    Location
    Illinois
    MS-Off Ver
    2013
    Posts
    12

    Re: list returns?

    Glenn, Thank you. I had five lists and obviously a much larger data set so my array formula now looks like this;

    {="List "&MIN(IF($A$2:$A$99999=A2,IF(ISNUMBER(MATCH($B$2:$B$99999,$J$2:J52,0)),9,IF(ISNUMBER(MATCH($B$2:$B$99999,$I$2:$I$12,0)),7,IF(ISNUMBER(MATCH($B$2:$B$99999,$H$2:$H$31,0)),1,IF(ISNUMBER(MATCH($B$2:$B$99999,$G$2:$G$15,0)),2,IF(ISNUMBER(MATCH($B$2:$B$99999,$K$2:$K$12,0)),3,"")))))))}

    It is working and spitting out the expected list names, interestingly I had to use my right shift and control to make the array turn on as my left shift and control would not O_O?

    One followup question
    If my lists are not named numerically, what do I need to change. For example I want to name my lists: Modern Set, Modern Core, Classic Set, Classic Core, Other. When I change the 1 2 3 to words it spits #name back at me
    Last edited by SineNomine; 04-22-2018 at 01:38 PM.

  6. #6
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,063

    Re: list returns?

    Odd behaviour...

    With reference to the sample sheet:

    =INDEX($G$2:$I$2,MIN(IF($A$2:$A$8=A2,IF(ISNUMBER(MATCH($B$2:$B$8,$G$3:$G$8,0)),1,IF(ISNUMBER(MATCH($B$2:$B$8,$H$3:$H$8,0)),2,IF(ISNUMBER(MATCH($B$2:$B$8,$I$3:$I$8,0)),3,""))))))

    array entered.





    If that takes care of your original question, please select "Thread Tools" from the menu link above and mark this thread as SOLVED.

    It'd also be appreciated if you were to click the Add Reputation button at the foot of any of the posts of all members who helped you reach a solution.
    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. VBA if returns value in order rather than current list
    By zak.horrocks in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 08-02-2016, 11:03 AM
  2. Look within a date range and list in all returns in a seperate tab
    By tripleb117 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 09-17-2013, 11:40 PM
  3. Returns a list from a range of two values
    By idrissohs in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 07-30-2013, 02:20 PM
  4. [SOLVED] Vlook up that returns the next value down a list once the preceeding value is found
    By fireguy7 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 04-01-2013, 04:07 PM
  5. Excel 2007 : How to create a list that returns unique values
    By Darlingdamsel in forum Excel General
    Replies: 8
    Last Post: 05-15-2012, 03:53 PM
  6. vlookup returns list?
    By tjb in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 12-06-2005, 07:55 PM
  7. function that returns a list to a single cell
    By AdamMCW in forum Excel General
    Replies: 2
    Last Post: 10-06-2005, 05:05 PM

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