+ Reply to Thread
Results 1 to 8 of 8

Comparison of array for Matching and non matching values

  1. #1
    Forum Contributor
    Join Date
    10-18-2016
    Location
    Chicago, USA
    MS-Off Ver
    Office 365
    Posts
    220

    Comparison of array for Matching and non matching values

    Hi All,

    Hope you are doing well!...I am trying to understand the matching and non-matching values from my input to an arrray in comparison...In my sheet columns B and C need to be derived based on the comparison of my input in column A on array values in cell G1...Can you please help me here.. Attaching the sheet...





    Thanks,
    Arun
    Attached Files Attached Files

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

    Re: Comparison of array for Matching and non matching values

    Are you still using Excel 2010? This is easy with Office 365...
    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

  3. #3
    Forum Contributor
    Join Date
    10-18-2016
    Location
    Chicago, USA
    MS-Off Ver
    Office 365
    Posts
    220

    Re: Comparison of array for Matching and non matching values

    Hi Glenn, No I am using office 365

  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 2406
    Posts
    44,662

    Re: Comparison of array for Matching and non matching values

    Please update your profile NOW to show O365.

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

    Re: Comparison of array for Matching and non matching values

    One cell (A17) causes problems... The comma "isn't there". It is seen as a thousands separator, not as a comma in a text string. We might need a workaround for that!! I formatted the cell as TEXT and reintroduced the comma.

    However, B2:

    =LET(a,FILTERXML("<A><B>"&SUBSTITUTE(A2,",","</B><B>")&"</B></A>","//B"),TEXTJOIN(", ",TRUE,IF(ISNUMBER(MATCH(a,FILTERXML("<A><B>"&SUBSTITUTE($G$1,",","</B><B>")&"</B></A>","//B"),0)),a,"")))

    and C2:

    =LET(a,FILTERXML("<A><B>"&SUBSTITUTE(A2,",","</B><B>")&"</B></A>","//B"),TEXTJOIN(", ",TRUE,IF(ISNA(MATCH(a,FILTERXML("<A><B>"&SUBSTITUTE($G$1,",","</B><B>")&"</B></A>","//B"),0)),a,"")))
    Attached Files Attached Files

  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 2406
    Posts
    44,662

    Re: Comparison of array for Matching and non matching values

    Here's how.
    Attached Images Attached Images

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

    Re: Comparison of array for Matching and non matching values

    Please try at

    B2
    =LET(a,FILTERXML("<x><m>"&SUBSTITUTE(TEXT(A2,"#,#"),",","</m><m>")&"</m></x>","//m"),TEXTJOIN(",",,FILTER(a,ISNUMBER(FIND(","&a&",",","&G$1&",")),"")))

    C2
    =LET(a,FILTERXML("<x><m>"&SUBSTITUTE(TEXT(A2,"#,#"),",","</m><m>")&"</m></x>","//m"),TEXTJOIN(",",,FILTER(a,ISERR(FIND(","&a&",",","&G$1&",")),"")))
    Attached Files Attached Files

  8. #8
    Forum Contributor
    Join Date
    10-18-2016
    Location
    Chicago, USA
    MS-Off Ver
    Office 365
    Posts
    220

    Re: Comparison of array for Matching and non matching values

    Thank you so much Glenn and Bo_Ry !!...

+ 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. Comparison of Values based on pattern Matching
    By chandramouliarun in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 03-15-2021, 07:19 AM
  2. [SOLVED] Matching values between array and matrix
    By arupaka in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 09-04-2019, 01:36 AM
  3. Replies: 7
    Last Post: 09-16-2017, 11:58 AM
  4. [SOLVED] Return cell values for non-matching & matching criteria
    By jenz_skallemose in forum Excel Programming / VBA / Macros
    Replies: 14
    Last Post: 11-13-2012, 11:52 AM
  5. Matching values only once against another value in Array
    By rafa in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 05-25-2011, 04:56 PM
  6. Replies: 2
    Last Post: 03-04-2009, 07:59 AM
  7. [SOLVED] Matching Values from an Array
    By Mal in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 01-04-2006, 06:10 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