+ Reply to Thread
Results 1 to 13 of 13

Match data separated by comma

  1. #1
    Registered User
    Join Date
    03-01-2018
    Location
    India
    MS-Off Ver
    2010
    Posts
    33

    Match data separated by comma

    Hi,

    Capture.JPG

    I have set of numbers (alphanumeric actually) separated by comma in cell B2 and another set of numbers separated by comma in cell C2.

    If any of the number in cell C2 matches to the number in cell B2, then I want "Yes" in cell D2. In other words, if there is any common number, then I want Yes in cell D2.

    Can you please let me know the formula?

    Thank you in advance, Good day.
    Attached Files Attached Files
    Last edited by Prascena; 11-20-2021 at 02:21 PM.

  2. #2
    Forum Expert
    Join Date
    09-01-2012
    Location
    Norway
    MS-Off Ver
    Office 365
    Posts
    2,883

    Re: Match data separated by comma

    Read the yellow box on top of this page.
    <----- If you were helped by my posts you can say "Thank you" by clicking the star symbol down to the left

    If the problem is solved, finish of the thread by clicking SOLVED under Thread Tools
    I don't wish to leave you with no answer, yet I sometimes miss posts. If you feel I forgot you, remind me with a PM or just bump the thread.

  3. #3
    Registered User
    Join Date
    03-01-2018
    Location
    India
    MS-Off Ver
    2010
    Posts
    33

    Re: Match data separated by comma

    Just did, sorry

  4. #4
    Forum Guru Bo_Ry's Avatar
    Join Date
    09-10-2018
    Location
    Thailand
    MS-Off Ver
    MS 365
    Posts
    7,222

    Re: Match data separated by comma

    Please try
    =IF(COUNT(SEARCH(","&TRIM(MID(SUBSTITUTE(C2,",",REPT(" ",99)),(ROW(Z$1:Z$20)-1)*LEN(C2)+1,LEN(C2)))&",",","&B2&",")),"Yes","No")
    Attached Files Attached Files

  5. #5
    Registered User
    Join Date
    03-01-2018
    Location
    India
    MS-Off Ver
    2010
    Posts
    33

    Re: Match data separated by comma

    Quote Originally Posted by Bo_Ry View Post
    Please try
    =IF(COUNT(SEARCH(","&TRIM(MID(SUBSTITUTE(C2,",",REPT(" ",99)),(ROW(Z$1:Z$20)-1)*LEN(C2)+1,LEN(C2)))&",",","&B2&",")),"Yes","No")
    Works great!! Thank you much

  6. #6
    Registered User
    Join Date
    03-01-2018
    Location
    India
    MS-Off Ver
    2010
    Posts
    33

    Re: Match data separated by comma

    Hello, I'm facing some issues. I find output incorrect in some cells

  7. #7
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 insider Version 2505 Win 11
    Posts
    24,719

    Re: Match data separated by comma

    We are unable to determine what your issues are unless you tell us. We cannot see what you see and we do not read minds. Tell us specifically what is wrong so it can be analyzed and a better solution provided.
    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

  8. #8
    Registered User
    Join Date
    03-01-2018
    Location
    India
    MS-Off Ver
    2010
    Posts
    33

    Re: Match data separated by comma

    Hello,

    Can anyone help me with formula to get the Output (Column C in attached excel)

    Column A and Column B have some numbers (Alpha Numeric) separated by comma. If they have any common number, then I need Column C value to be "Yes" and if not I need value to be "No".

    Can anyone help with this? The last code didnt work and though there were common items between Col A and Col B, still the result was saying "No"

    Thank you in advance.
    Attached Files Attached Files

  9. #9
    Forum Guru Bo_Ry's Avatar
    Join Date
    09-10-2018
    Location
    Thailand
    MS-Off Ver
    MS 365
    Posts
    7,222

    Re: Match data separated by comma

    =IF(COUNT(SEARCH(","&TRIM(MID(SUBSTITUTE(A2,",",REPT(" ",99)),(ROW(Z$1:Z$99)-1)*LEN(A2)+1,LEN(A2)))&",",","&B2&",")),"Yes","No")

    =IF(COUNT(SEARCH(","&TRIM(MID(SUBSTITUTE(B2,",",REPT(" ",99)),(ROW(Y$1:Y$99)-1)*LEN(B2)+1,LEN(B2)))&",",","&A2&",")),"Yes","No")
    Attached Files Attached Files

  10. #10
    Registered User
    Join Date
    03-01-2018
    Location
    India
    MS-Off Ver
    2010
    Posts
    33

    Re: Match data separated by comma

    Quote Originally Posted by Bo_Ry View Post
    =IF(COUNT(SEARCH(","&TRIM(MID(SUBSTITUTE(A2,",",REPT(" ",99)),(ROW(Z$1:Z$99)-1)*LEN(A2)+1,LEN(A2)))&",",","&B2&",")),"Yes","No")

    =IF(COUNT(SEARCH(","&TRIM(MID(SUBSTITUTE(B2,",",REPT(" ",99)),(ROW(Y$1:Y$99)-1)*LEN(B2)+1,LEN(B2)))&",",","&A2&",")),"Yes","No")
    Hello thank you!!

    May I know why is that two formulas are there and you have added two columns in the attachment? I just need "Yes" if there is any number common number existing between col A and B and "No" if it doesnt. Is that possible?

    Thank you for helping

  11. #11
    Registered User
    Join Date
    03-01-2018
    Location
    India
    MS-Off Ver
    2010
    Posts
    33

    Re: Match data separated by comma

    Quote Originally Posted by Bo_Ry View Post
    =IF(COUNT(SEARCH(","&TRIM(MID(SUBSTITUTE(A2,",",REPT(" ",99)),(ROW(Z$1:Z$99)-1)*LEN(A2)+1,LEN(A2)))&",",","&B2&",")),"Yes","No")

    =IF(COUNT(SEARCH(","&TRIM(MID(SUBSTITUTE(B2,",",REPT(" ",99)),(ROW(Y$1:Y$99)-1)*LEN(B2)+1,LEN(B2)))&",",","&A2&",")),"Yes","No")
    Attachment 756524

    See above, there is a common number available, but output says "No". Can this issue be fixed?

    Thank you.

  12. #12
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 insider Version 2505 Win 11
    Posts
    24,719

    Re: Match data separated by comma

    The attachment is not visible. Suggest you upload a picture or the file showing what the attachment is meant to show.

  13. #13
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 insider Version 2505 Win 11
    Posts
    24,719

    Re: Match data separated by comma

    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. No help to be offered until the link is provided.)

+ 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. Find match of comma-separated values in another table
    By fabiotosi2004 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 02-28-2021, 06:17 AM
  2. Replies: 4
    Last Post: 12-01-2020, 01:20 PM
  3. Match criteria in table and make combinated result with comma separated
    By 155mahe in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 01-15-2020, 04:53 PM
  4. [SOLVED] INDEX MATCH comma separated values in one cell
    By Jay S. in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 09-02-2019, 12:20 AM
  5. Replies: 5
    Last Post: 02-18-2017, 11:21 AM
  6. Match a Value from a single-cell, comma separated list
    By secondchild12 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 11-24-2014, 06:16 PM
  7. [SOLVED] Macro to match values in cells separated by semicolon and comma
    By Ale84 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 04-21-2013, 11:00 PM

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