+ Reply to Thread
Results 1 to 52 of 52

Show a list of values from one column with a value match in another column

  1. #1
    Registered User
    Join Date
    12-07-2021
    Location
    United States
    MS-Off Ver
    365
    Posts
    23

    Question Show a list of values from one column with a value match in another column

    I cannot think of the right function or code to read the specific column down on each row to match Yes and return the value of each row on the A column to another specific cell.

    For example:

    A
    B
    C
    D
    E
    F
    1
    Store
    Apple
    Pear
    Orange
    Banana
    Lemon
    2
    Wal-Mart
    Yes
    No
    No
    Yes
    Yes
    3
    Target
    Yes
    Yes
    Yes
    No
    No
    4
    Kroger
    No
    No
    Yes
    No
    Yes
    5
    Aldi
    Yes
    No
    Yes
    Yes
    Yes
    6
    Tom's
    Yes
    Yes
    No
    Yes
    No

    Sample result:

    Item
    Orange
    Stores
    Target, Kroger Aldi



    If I select Apple (A8), I want the value of each store with "Yes" on Apple (column) and return with "Wal-Mart, Target, Aldi, Tom's" on A9 cell. But Kroger will be ignored. If I change Apple to Pear, the search will change to a different column and search down then return with "Target, Tom's" in the A9 cell automatically.

    Can anyone please assist me on that?
    Last edited by Zorrie; 10-08-2023 at 10:19 PM. Reason: SOLVED

  2. #2
    Forum Moderator jeffreybrown's Avatar
    Join Date
    02-19-2009
    Location
    Cibolo, TX
    MS-Off Ver
    Office 365
    Posts
    10,316

    Re: Show a list of values from one column with a value match in another column

    Is your version of Excel correct? If you have 365 you could use >> =TEXTJOIN(", ",,FILTER(A2:A6,INDEX(B2:F6,,MATCH(A8,B1:F1,0))="Yes"))
    HTH
    Regards, Jeff

  3. #3
    Registered User
    Join Date
    12-07-2021
    Location
    United States
    MS-Off Ver
    365
    Posts
    23

    Re: Show a list of values from one column with a value match in another column

    Quote Originally Posted by jeffreybrown View Post
    Is your version of Excel correct? If you have 365 you could use >> =TEXTJOIN(", ",,FILTER(A2:A6,INDEX(B2:F6,,MATCH(A8,B1:F1,0))="Yes"))
    Wow, it does work very well. I did try to use TEXTJOIN and INDEX but I never thought that FILTER and MATCH functions do work too.

    One more question before I am going to close this as Solved: How can I input the new line or return the value on the next row down from the original cell with that code if it is possible?

    By the way, I tried to use formatted data but it won't let me somehow. Forgive me for that.

    PS. Another question: How can you edit the code to check two or more fruits with "Yes" at the same time?
    Last edited by Zorrie; 10-05-2023 at 03:00 PM. Reason: Add another question

  4. #4
    Forum Moderator jeffreybrown's Avatar
    Join Date
    02-19-2009
    Location
    Cibolo, TX
    MS-Off Ver
    Office 365
    Posts
    10,316

    Re: Show a list of values from one column with a value match in another column

    Glad it worked out for you. Can you please update your profile to reflect the version of Excel you are using.

    Not sure I understand your follow-up question. Can you provide a working sample and what you are trying to achieve? Post a worksheet.

  5. #5
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2405 Win 11 Home 64 Bit
    Posts
    23,895

    Re: Show a list of values from one column with a value match in another column

    an alternative using Power Query to unpivot your data and then concatenate in a Pivot Table in Power Pivot

    Mcode to unpivot

    Please Login or Register  to view this content.
    Close and Load to Data Model

    Here is DAX measure to concatenate

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


    While Jeff has given you a simple solution, this may be helpful if you have a large data set with many categories.

    Any changes to the source data will be reflected in the final output by selecting Refresh All on the Data Tab.

    Excel 2016 (Windows) 64 bit
    A
    B
    C
    D
    E
    F
    G
    H
    I
    1
    Store Apple Pear Orange Banana Lemon Row Labels Stores
    2
    Wal-Mart Yes No No Yes Yes Apple Wal-Mart, Target, Aldi, Tom's
    3
    Target Yes Yes Yes No No Banana Wal-Mart, Aldi, Tom's
    4
    Kroger No No Yes No Yes Lemon Wal-Mart, Kroger, Aldi
    5
    Aldi Yes No Yes Yes Yes Orange Target, Kroger, Aldi
    6
    Tom's Yes Yes No Yes No Pear Target, Tom's
    Sheet: Sheet3
    Attached Files Attached Files
    Last edited by alansidman; 10-05-2023 at 03:21 PM.
    Alan עַם יִשְׂרָאֵל חַי


    Change an Ugly Report with Power Query
    Database Normalization
    Complete Guide to Power Query
    Man's Mind Stretched to New Dimensions Never Returns to Its Original Form

  6. #6
    Registered User
    Join Date
    12-07-2021
    Location
    United States
    MS-Off Ver
    365
    Posts
    23

    Re: Show a list of values from one column with a value match in another column

    Quote Originally Posted by jeffreybrown View Post
    Glad it worked out for you. Can you please update your profile to reflect the version of Excel you are using?

    Not sure I understand your follow-up question. Can you provide a working sample and what you are trying to achieve? Post a worksheet.

    If I select two or more items, then only stores with those selected items will be displayed on the cell.

    For example, if I selected Pear and Orange, then Target will be displayed on the cell. Because Target is the only store with both Pear and Orange.


    Excel.xlsx

    By the way, I am using Microsoft Office 365.

  7. #7
    Registered User
    Join Date
    12-07-2021
    Location
    United States
    MS-Off Ver
    365
    Posts
    23

    Re: Show a list of values from one column with a value match in another column

    Quote Originally Posted by alansidman View Post
    an alternative using Power Query to unpivot your data and then concatenate in a Pivot Table in Power Pivot
    I haven't gotten that far enough to learn Pivot yet. But thanks for your assistance.
    Last edited by jeffreybrown; 10-05-2023 at 03:40 PM. Reason: Please do not quote entire posts. It's just clutter.

  8. #8
    Registered User
    Join Date
    12-07-2021
    Location
    United States
    MS-Off Ver
    365
    Posts
    23

    Re: Show a list of values from one column with a value match in another column

    Yes, I already have the answer for Pear only in B9 and Orange only in B12. But I need to have the cell to display any store that has both Pear and Orange as TRUE.

    There is a pear in Target and Tom's. (B9)

    There is an orange in Target, Kroger, and Aldi. (B12)

    There are both pear and orange in Target. (B15)

    Does it make sense to you?

  9. #9
    Forum Moderator jeffreybrown's Avatar
    Join Date
    02-19-2009
    Location
    Cibolo, TX
    MS-Off Ver
    Office 365
    Posts
    10,316

    Re: Show a list of values from one column with a value match in another column

    Yes, it makes sense, I'm not 100% sure how to get there. Hang on and some other help may come.

  10. #10
    Forum Moderator jeffreybrown's Avatar
    Join Date
    02-19-2009
    Location
    Cibolo, TX
    MS-Off Ver
    Office 365
    Posts
    10,316

    Re: Show a list of values from one column with a value match in another column

    Ok, not sure how to do this in one cell, but maybe this as an option.

    Put this in K1 >> =TEXTSPLIT(CONCAT(B9,", ",B12),,", ")

    Now in B15 >> =TEXTJOIN(", ",,UNIQUE(FILTER(K:K,COUNTIF(K:K,K:K)>1)))

  11. #11
    Registered User
    Join Date
    12-07-2021
    Location
    United States
    MS-Off Ver
    365
    Posts
    23

    Re: Show a list of values from one column with a value match in another column

    Quote Originally Posted by jeffreybrown View Post
    Ok, not sure how to do this in one cell, but maybe this as an option....
    That would work too but I don't like to have two separate cells to get the answer. I rather to have codes in a single cell to get an answer.

    I can wait for others may come help if they can do it.

    But I do appreciate your effort, Jeff.

  12. #12
    Forum Moderator jeffreybrown's Avatar
    Join Date
    02-19-2009
    Location
    Cibolo, TX
    MS-Off Ver
    Office 365
    Posts
    10,316

    Re: Show a list of values from one column with a value match in another column

    You are very welcome. I'll still put some brain power to this, but I have to run now. Good luck.

  13. #13
    Forum Moderator
    Join Date
    01-21-2014
    Location
    St. Joseph, Illinois U.S.A.
    MS-Off Ver
    Office 365 v 2403
    Posts
    13,406

    Re: Show a list of values from one column with a value match in another column

    I'm late to the party again. If I understand correctly try
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Dave

  14. #14
    Registered User
    Join Date
    12-07-2021
    Location
    United States
    MS-Off Ver
    365
    Posts
    23

    Re: Show a list of values from one column with a value match in another column

    Tried that but not working.

  15. #15
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2405 Win 11 Home 64 Bit
    Posts
    23,895

    Re: Show a list of values from one column with a value match in another column

    Look at the example in the spreadsheet and also look at this link to understand what happens in Power Pivot.

    https://sfmagazine.com/post-entry/ju...a-pivot-table/

    and then to understand how to apply the Power Query....


    Power Query is a free AddIn for Excel 2010 and 2013, and is built-in functionality from Excel 2016 onwards (where it is referred to as "Get & Transform Data").

    It is a powerful yet simple way of getting, changing and using data from a broad variety of sources, creating steps which may be easily repeated and refreshed. I strongly recommend learning how to use Power Query - it's among the most powerful functionalities of Excel.

    - Follow this link to learn how to install Power Query in Excel 2010 / 2013.

    - Follow this link for an introduction to Power Query functionality.

    - Follow this link for a video which demonstrates how to use Power Query code provided.

  16. #16
    Registered User
    Join Date
    12-07-2021
    Location
    United States
    MS-Off Ver
    365
    Posts
    23

    Re: Show a list of values from one column with a value match in another column

    Quote Originally Posted by alansidman View Post
    Look at the example in the spreadsheet and also look at this link to understand what happens in Power Pivot......

    Thanks for your effort but I want this working without addons because it will go into Google Spreadsheet.

  17. #17
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2405 Win 11 Home 64 Bit
    Posts
    23,895

    Re: Show a list of values from one column with a value match in another column

    Thanks for your effort but I want this working without addons because it will go into Google Spreadsheet.
    You should make that clear up front so others don't waste their precious time doing something for you.

    At this site it is about learning and not having someone do your work for you. My efforts were to expand your knowledge and abilities. If you had made your total needs known, I would have let this post fly by. Good Luck with your project.

  18. #18
    Registered User
    Join Date
    12-07-2021
    Location
    United States
    MS-Off Ver
    365
    Posts
    23

    Re: Show a list of values from one column with a value match in another column

    Quote Originally Posted by alansidman View Post
    You should make that clear up front so others don't waste their precious time doing something for you.

    At this site, it is about learning and not having someone do your work for you. My efforts were to expand your knowledge and abilities. If you had made your total needs known, I would have let this post fly by. Good Luck with your project.
    Okay, my apology for that. However, no one wants to ask me if I want to do the add-ons or not. I tried to get this small issue working out of my huge Excel/Spreadsheet project which I have been working on for the last couple of years.

  19. #19
    Forum Moderator
    Join Date
    01-21-2014
    Location
    St. Joseph, Illinois U.S.A.
    MS-Off Ver
    Office 365 v 2403
    Posts
    13,406

    Re: Show a list of values from one column with a value match in another column

    Quote Originally Posted by Zorrie View Post
    Tried that but not working.
    How exactly is it "not working"? What is it returning specifically? It is working at my end.


    A
    B
    C
    8
    Item
    Pear
    9
    Store
    Target, Tom's
    10
    11
    Item
    Orange
    12
    Store
    Target, Kroger, Aldi
    13
    14
    Items
    Pear, Orange
    15
    Store:
    #VALUE!
    16
    Target
    Target


    Please see B16 in the attached. Also this in C16
    Formula: copy to clipboard
    Please Login or Register  to view this content.

  20. #20
    Registered User
    Join Date
    12-07-2021
    Location
    United States
    MS-Off Ver
    365
    Posts
    23

    Re: Show a list of values from one column with a value match in another column

    Quote Originally Posted by FlameRetired View Post
    How exactly is it "not working"? What is it returning specifically? It is working at my end....
    Try to change B8 to "Orange" and B11 to "Lemon" then the result in B15 shows empty. But there are both orange and lemon in Kroger and Aldi's.
    Last edited by Zorrie; 10-05-2023 at 06:54 PM. Reason: Edit to correct information

  21. #21
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2405 Win 11 Home 64 Bit
    Posts
    23,895

    Re: Show a list of values from one column with a value match in another column

    However, no one wants to ask me if I want to do the add-ons or not.
    Power Query is not an add in for 365. It is an integral part of Excel and found on the DATA tab. It is referred to there as Get and Transform Data as I noted in Post #15.

  22. #22
    Forum Moderator
    Join Date
    01-21-2014
    Location
    St. Joseph, Illinois U.S.A.
    MS-Off Ver
    Office 365 v 2403
    Posts
    13,406

    Re: Show a list of values from one column with a value match in another column

    Yeah OK I think I see it now. Try
    Formula: copy to clipboard
    Please Login or Register  to view this content.

  23. #23
    Registered User
    Join Date
    12-07-2021
    Location
    United States
    MS-Off Ver
    365
    Posts
    23

    Re: Show a list of values from one column with a value match in another column

    Quote Originally Posted by FlameRetired View Post
    Yeah OK I think I see it now. Try
    Yeah, it does work.

    To prevent any error message from being displayed, I had to add the IFERROR function with "None found" in case two different items don't have the same store. But I tried to put the same item in both B8 and B11, it shows the error result (#VALUE!).

    Instead of #VALUE! error, do I have to use some kind of function to check if B8 and B11 are the exact same, then B15 would show the result without any kind of error?

  24. #24
    Forum Moderator
    Join Date
    01-21-2014
    Location
    St. Joseph, Illinois U.S.A.
    MS-Off Ver
    Office 365 v 2403
    Posts
    13,406

    Re: Show a list of values from one column with a value match in another column

    Hmmm. Let me work on that one.

  25. #25
    Registered User
    Join Date
    12-07-2021
    Location
    United States
    MS-Off Ver
    365
    Posts
    23

    Re: Show a list of values from one column with a value match in another column

    Quote Originally Posted by FlameRetired View Post
    Hmmm. Let me work on that one.
    I am experimenting to add the third item by using this attempted code:

    Please Login or Register  to view this content.
    It returned with #VALUE! error but did I miss something else to edit?

  26. #26
    Forum Moderator
    Join Date
    01-21-2014
    Location
    St. Joseph, Illinois U.S.A.
    MS-Off Ver
    Office 365 v 2403
    Posts
    13,406

    Re: Show a list of values from one column with a value match in another column

    Rather than drip feeding us new information please show us the full range of variables you anticipate using the and the specific counts of "Yes" that qualify a store.

  27. #27
    Registered User
    Join Date
    12-07-2021
    Location
    United States
    MS-Off Ver
    365
    Posts
    23

    Re: Show a list of values from one column with a value match in another column

    After the code for two different items is successful with people's help here, all I do is add the third item and compare three different items to see which store has all of them. But the result shows an error. I am not sure what I have done wrong.

    Excel.xlsx

    Also, as I said before, I had to add an IFERROR function with "None found" if three different items have no common store. I tried to get this working if two or three different cells have the same item, then the result would be the list of store(s) if there are without displaying the #VALUE! error.

    I know that it seems a very tall order. But I am struggling to get this code working as I am doing my best.

  28. #28
    Forum Expert bebo021999's Avatar
    Join Date
    07-22-2011
    Location
    Vietnam
    MS-Off Ver
    Excel 2016
    Posts
    9,466

    Re: Show a list of values from one column with a value match in another column

    How about an UDF? (user defined formula base on VBA code)
    Quang PT

  29. #29
    Registered User
    Join Date
    12-07-2021
    Location
    United States
    MS-Off Ver
    365
    Posts
    23

    Re: Show a list of values from one column with a value match in another column

    Quote Originally Posted by bebo021999 View Post
    How about an UDF? (user defined formula base on VBA code)
    It may work in Excel but not in Google Spreadsheet. So, that's why I want it work well in both Excel and Spreadsheet.

  30. #30
    Forum Expert bebo021999's Avatar
    Join Date
    07-22-2011
    Location
    Vietnam
    MS-Off Ver
    Excel 2016
    Posts
    9,466

    Re: Show a list of values from one column with a value match in another column

    Quote Originally Posted by Zorrie View Post
    It may work in Excel but not in Google Spreadsheet. So, that's why I want it work well in both Excel and Spreadsheet.
    OK.
    But I've already finished writing the VBA code for the Store function.
    I'll still post it in case someone needs it for their project.

    =Store(Data_Range, lookup_cell)
    In B9:
    =store($A$1:$F$6,B8)

    PHP Code: 
    Option Explicit
    Private Function Store(ByVal rng As Rangece As Range) As String
    Dim i
    &, j&, sstrng2
    Dim dic 
    As Object
    Set dic 
    CreateObject("Scripting.Dictionary")
    rng2 rng.Value
    For Each s In Split(ce",")
        For 
    2 To UBound(rng22)
            If 
    rng2(1j) = Trim(sThen
                
    For 2 To UBound(rng2)
                    If 
    rng2(ij) = "Yes" Then
                        
    If Not dic.exists(iThen
                            st 
    IIf(st """"st ", ") & rng2(i1)
                            
    dic.Add i""
                        
    End If
                    
    End If
                
    Next
            End 
    If
        
    Next
    Next
    Store 
    st
    Set dic 
    Nothing
    End 
    Function 
    Attached Files Attached Files

  31. #31
    Forum Expert
    Join Date
    09-25-2015
    Location
    Milan Italy
    MS-Off Ver
    office 365
    Posts
    1,783

    Re: Show a list of values from one column with a value match in another column

    B18=IFERROR(INDEX($A$2:$A$6,AGGREGATE(15,6,ROW($A$2:$A$6)-ROW($A$2)+1/(ISNUMBER(MATCH($B$1:$F$1,TEXTSPLIT($B$17,","),0))/($B$2:$F$6=$B$2)),COLUMNS($A$1:A1))),"")

    Copy across

  32. #32
    Registered User
    Join Date
    12-07-2021
    Location
    United States
    MS-Off Ver
    365
    Posts
    23

    Re: Show a list of values from one column with a value match in another column

    Quote Originally Posted by CARACALLA View Post
    B18=IFERROR(INDEX($A$2:$A$6,AGGREGATE(15,6,ROW($A$2:$A$6)-ROW($A$2)+1/(ISNUMBER(MATCH($B$1:$F$1,TEXTSPLIT($B$17,","),0))/($B$2:$F$6=$B$2)),COLUMNS($A$1:A1))),"")

    Copy across
    Tried that but I see the result:

    Apple
    Wal-Mart, Target, Aldi's, Tom's

    Pear
    Target, Tom's

    Orange
    Target, Kroger, Aldi

    After tried your code:

    Apple, Pear, Orange
    Wal-Mart

    Wal-Mart is incorrect. Target should be shown in the cell, not Wal-Mart. Because Target has all of the apple, pear, and orange.

  33. #33
    Registered User
    Join Date
    12-07-2021
    Location
    United States
    MS-Off Ver
    365
    Posts
    23

    Re: Show a list of values from one column with a value match in another column

    Finally, I got this code working for adding the third item.

    For a combination of two items,

    Please Login or Register  to view this content.
    Thanks, FlameRetired, for the code above. I edited the code for adding the third item below.

    For a combination of three items,

    Please Login or Register  to view this content.
    However, there is still an error when there are duplicate items in two or more cells, the cell still shows the #VALUE! error. Still working on that.
    Last edited by Zorrie; 10-06-2023 at 12:16 AM.

  34. #34
    Forum Moderator
    Join Date
    01-21-2014
    Location
    St. Joseph, Illinois U.S.A.
    MS-Off Ver
    Office 365 v 2403
    Posts
    13,406

    Re: Show a list of values from one column with a value match in another column

    I used the set up in the attached to add the 3rd item.

    In columns A:B I made room for the additional data.

    in B17 this formula concatenates the specified items.
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    In B18 this beast concatenates the qualifying stores (if any).
    Formula: copy to clipboard
    Please Login or Register  to view this content.

  35. #35
    Registered User
    Join Date
    12-07-2021
    Location
    United States
    MS-Off Ver
    365
    Posts
    23

    Re: Show a list of values from one column with a value match in another column

    Quote Originally Posted by FlameRetired View Post
    I used the set up in the attached to add the 3rd item......
    It does work well. As I cleaned up the unnecessary empty cells and sorted the items in a single row with the list of stores with "Yes" below each item, I added your code to the cell that displayed the list of selected items and tried to use your code to show the list of specific stores which have all of the selected items. After I edited that code with the correct cells, it did not show any stores as it should be. Did I overlook the code somewhere in the F9 cell?

    Please Login or Register  to view this content.
    Show a list of values from one column with a value match in another column V4.xlsx

    Also, how can the E8 cell show the number "1" if the items in B8:D8 are empty?

  36. #36
    Forum Moderator
    Join Date
    01-21-2014
    Location
    St. Joseph, Illinois U.S.A.
    MS-Off Ver
    Office 365 v 2403
    Posts
    13,406

    Re: Show a list of values from one column with a value match in another column

    This tells me nothing without the file in question uploaded.

  37. #37
    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: Show a list of values from one column with a value match in another column

    There's a file attached to post #35 (second to bottom line of the post).
    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.

  38. #38
    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: Show a list of values from one column with a value match in another column

    Try this in F9:

    =LET(f,FILTER(B2:H6,ISNUMBER(MATCH(B1:H1,B8:D8,0))),b,BYROW(f,LAMBDA(r,SUMPRODUCT((r="Yes")*(r<>""))=COUNTA(B8:D8))),FILTER(A2:A6,b))
    Last edited by AliGW; 10-08-2023 at 12:24 PM. Reason: Workbook added.

  39. #39
    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: Show a list of values from one column with a value match in another column

    Or maybe this?

    =LET(f,FILTER(B2:H6,ISNUMBER(MATCH(B1:H1,B8:D8,0))),b,BYROW(f,LAMBDA(r,SUMPRODUCT((r="Yes")*(r<>""))=COUNTA(B8:D8))),IFERROR(TEXTJOIN(", ",,FILTER(A2:A6,b)),"No Store Qualifies"))

  40. #40
    Forum Moderator
    Join Date
    01-21-2014
    Location
    St. Joseph, Illinois U.S.A.
    MS-Off Ver
    Office 365 v 2403
    Posts
    13,406

    Re: Show a list of values from one column with a value match in another column

    Thank you Ali. I must be blind this morning.

  41. #41
    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: Show a list of values from one column with a value match in another column

    Nearly time to log off here! Anyway, I had a go.

  42. #42
    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: Show a list of values from one column with a value match in another column

    @Zorrie - some feedback would be appreciated. Did my suggestion work for you or not?

  43. #43
    Forum Moderator
    Join Date
    01-21-2014
    Location
    St. Joseph, Illinois U.S.A.
    MS-Off Ver
    Office 365 v 2403
    Posts
    13,406

    Re: Show a list of values from one column with a value match in another column

    Quote Originally Posted by Zorrie View Post
    ........Did I overlook the code somewhere in the F9 cell?
    I don't know. The solution I offered was heavily dependent upon the layout. Will you be staying with this new layout? If so it will take me a while to solve this new one ... which will also be heavily dependent upon layout.

  44. #44
    Registered User
    Join Date
    12-07-2021
    Location
    United States
    MS-Off Ver
    365
    Posts
    23

    Re: Show a list of values from one column with a value match in another column

    Quote Originally Posted by AliGW View Post
    @Zorrie - some feedback would be appreciated. Did my suggestion work for you or not?
    Yes, it does work in the example of my work. However, I tried converting your code to my work with multiple sheets. The result shows nothing. I did check through the edited code carefully many times but nothing happened.

    Also, I test to put the same fruit in Item #1, #2, and #3; the result shows nothing. It should show the list of places.

    Would your code be working well in Google Spreadsheet as it should be in Excel?
    Last edited by Zorrie; 10-08-2023 at 01:59 PM.

  45. #45
    Registered User
    Join Date
    12-07-2021
    Location
    United States
    MS-Off Ver
    365
    Posts
    23

    Re: Show a list of values from one column with a value match in another column

    Quote Originally Posted by FlameRetired View Post
    I don't know. The solution I offered was heavily dependent upon the layout. Will you be staying with this new layout? If so it will take me a while to solve this new one ... which will also be heavily dependent upon layout.
    Sure, if you want to. But you don't have to.

  46. #46
    Forum Moderator
    Join Date
    01-21-2014
    Location
    St. Joseph, Illinois U.S.A.
    MS-Off Ver
    Office 365 v 2403
    Posts
    13,406

    Re: Show a list of values from one column with a value match in another column

    I worked with your latest upload. In the attached I filled out row 8 with drop downs to column H. This allows the solution to work with up to 7 Items.

    In cell I8 this concatenates the chosen Items
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    and in cell I9 this concatenates the qualifying Stores
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Please let me know how this works at your end.
    Last edited by FlameRetired; 10-08-2023 at 02:13 PM.

  47. #47
    Registered User
    Join Date
    12-07-2021
    Location
    United States
    MS-Off Ver
    365
    Posts
    23

    Re: Show a list of values from one column with a value match in another column

    Quote Originally Posted by FlameRetired View Post
    I worked with your latest upload. In the attached I filled out row 8 with drop downs to column H. This allows the solution to work with up to 7...
    @FlameRetired,

    Oddly, with three selected items, it does work in my real work. If I selected two items or fewer OR two or more same items, the error message shows at my end. The error said, "No matches are found in FILTER evaluation." if I selected two items or fewer OR selected two or three same items. Same for the empty cells.

    @AliGW,

    I tried to use your code in my real work but it only works with three selected items. However, it won't work with two selected items or fewer. Not even with empty cells.


    That is really a big scratch on the back of my head.

  48. #48
    Forum Moderator
    Join Date
    01-21-2014
    Location
    St. Joseph, Illinois U.S.A.
    MS-Off Ver
    Office 365 v 2403
    Posts
    13,406

    Re: Show a list of values from one column with a value match in another column

    Zorrie and Ali did you try those in the upload or did you copy/paste the formulas? I ask because all those work on the file (as uploaded) at my end.

    Edit: but it doesn't work with duplicates. Back to the salt mine.
    Last edited by FlameRetired; 10-08-2023 at 05:12 PM.

  49. #49
    Forum Moderator
    Join Date
    01-21-2014
    Location
    St. Joseph, Illinois U.S.A.
    MS-Off Ver
    Office 365 v 2403
    Posts
    13,406

    Re: Show a list of values from one column with a value match in another column

    My previous was not accounting for duplicates or the fact that UNIQUE requires a TRUE argument when applied to columns which has row wise arrays (all comma separated values).
    My bad. My apologies.

    In I8 of the attached
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    in I9
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Last edited by FlameRetired; 10-08-2023 at 05:56 PM.

  50. #50
    Registered User
    Join Date
    12-07-2021
    Location
    United States
    MS-Off Ver
    365
    Posts
    23

    Re: Show a list of values from one column with a value match in another column

    Quote Originally Posted by FlameRetired View Post
    My previous was not accounting for duplicates or the fact that UNIQUE requires a TRUE argument when applied to columns which has row wise arrays (all comma separated values)....
    Yes, yes, yes, yes, yes, you did it! It's working exactly as I want it. I had to replace ", " with CHAR(10) in TEXTJOIN function but it stretched the cell down with the list of stores in a new line. How can I get the list of stores in each row of the cell below just like the single item that displayed the list of stores below?

  51. #51
    Registered User
    Join Date
    12-07-2021
    Location
    United States
    MS-Off Ver
    365
    Posts
    23

    Re: Show a list of values from one column with a value match in another column

    Ahhh, I got it working. I had to remove TEXTJOIN function and it is now displaying the list of places below in each row of cells.

    Thanks, everyone, for doing your best to assist me with that. I truly appreciate that.

    I am going to close this as SOLVED.

  52. #52
    Forum Moderator
    Join Date
    01-21-2014
    Location
    St. Joseph, Illinois U.S.A.
    MS-Off Ver
    Office 365 v 2403
    Posts
    13,406

    Re: Show a list of values from one column with a value match in another column

    You are welcome. Glad to help. Thank you for the feedback and marking your thread Solved.

+ 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. Replies: 1
    Last Post: 02-10-2023, 10:18 AM
  2. [SOLVED] Left function, Right Function, or Mid Function to extract values to three decimal places
    By bjnockle in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 01-08-2023, 03:22 AM
  3. Right function, Left function, Mid function to extract values in column A
    By bjnockle in forum Excel Formulas & Functions
    Replies: 18
    Last Post: 06-14-2020, 03:14 PM
  4. COUNTUNIQUE Function in Google Sheets; Excel lacks a direct counterpart to this function?
    By PivotTablePSHomage in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 03-18-2018, 05:27 AM
  5. Calling function inside function. (aka nested function)
    By jakopak in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 11-02-2015, 05:58 AM
  6. Replies: 13
    Last Post: 04-08-2014, 05:46 AM
  7. Replies: 1
    Last Post: 03-21-2012, 11:22 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