+ Reply to Thread
Results 1 to 13 of 13

Search letters and numbers to see if exist in another column by at least 7 characters

  1. #1
    Registered User
    Join Date
    12-08-2023
    Location
    Barcelona, Spain
    MS-Off Ver
    Excel 2010
    Posts
    5

    Search letters and numbers to see if exist in another column by at least 7 characters

    Dear community,

    I am trying to create a formula to use in Excel 2010.
    The formula should try to find a match searching in 2 columns of at least 7 characters (letters and numbers) and return "match" as a result if found.

    My issue:
    I have two columns, Pass1 and Pass2. containing characters mixed with letters and numbers. I need to know if the characters are found in both columns.
    In column Pass1 the order is correct and in column Pass2 the order may be incorrect but I still need it to return "match" if it has the same characters, at least 7 should be enough. It also need to disregard of capital and small letters.

    What I have tried:
    I have used ChatGPT and Excel AI and got this formula " =IF(SUMPRODUCT(--(EXACT(MID(A1,ROW(INDIRECT("1:"&LEN(A1))),1),MID(B1,ROW(INDIRECT("1:"&LEN(B1))),1))))>=7,"Match","No Match") "

    But it just return with errors when put into C2.

    Attached file:
    The file contains columns Pass1 with correct order and Pass2 with incorrect order, but in the file all are matched by 7 characters so in column C it should all return "Match".

    Thank you in advance!
    Mary
    Attached Files Attached Files
    Last edited by MaryMaria; 12-15-2023 at 07:45 AM.

  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 2403
    Posts
    44,053

    Re: Search letters and numbers to see if exist in another column by at least 7 characters

    1. All your strings were 10 characters long. Are they, in reality?

    2. A "No Match" or two should have been in your sample.

    3. try:

    =IF(A3="","",IF(SUM(--(ISNUMBER(MATCH(MID(A3,SEQUENCE(10),1),MID(B3,SEQUENCE(10),1),0))))>=7,"Match","No match"))
    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

  3. #3
    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,848

    Re: Search letters and numbers to see if exist in another column by at least 7 characters

    Pages is not an Excel version, and it’s not even a spreadsheet package. Are you using Apple Sheets?
    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.

  4. #4
    Registered User
    Join Date
    12-08-2023
    Location
    Barcelona, Spain
    MS-Off Ver
    Excel 2010
    Posts
    5

    Re: Search letters and numbers to see if exist in another column by at least 7 characters

    Hi Ali,
    Sorry what I meant was "Numbers" of course which I assume is the same as Apple Sheets. Thank you for pointing that.

  5. #5
    Registered User
    Join Date
    12-08-2023
    Location
    Barcelona, Spain
    MS-Off Ver
    Excel 2010
    Posts
    5

    Re: Search letters and numbers to see if exist in another column by at least 7 characters

    Hi Glenn and thank you for helping me out.

    I am now trying in Excel 2010. To answer your questions
    1. No, they can vary in length as they are passport numbers from different countries
    2. I will add now, sorry for that
    3. I did try this in column C2 but it gives "No match" in all thew columns.

    Do you have any other ideas of what I do wrong since you obviously got the correct result?

    Many thanks!
    Attached Files Attached Files
    Last edited by MaryMaria; 12-08-2023 at 04:01 PM. Reason: adding template

  6. #6
    Forum Guru HansDouwe's Avatar
    Join Date
    06-21-2022
    Location
    Nederland
    MS-Off Ver
    365 V2403 (Build 17330.20000)
    Posts
    6,427

    Re: Search letters and numbers to see if exist in another column by at least 7 characters

    SEQUENCE(10) does not work in Excel 2010.

    Please replace SEQUENCE(10) with ROW($1:$10) and everything works fine in Excel 2010.

    This is an array formula, so you need to confirm the formula with Ctrl+Shift+Enter
    Attached Files Attached Files

  7. #7
    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,053

    Re: Search letters and numbers to see if exist in another column by at least 7 characters

    Your profile stated O365, so that's what I went with! That said, Hans' suggestion will fix it.

    You're welcome. Thanks for letting us know that you got an answer.




    Please take a moment and consider clicking the "Add Reputation" button at the foot of any of the posts of anyone who helped you reach a solution here today.

    Finally, if that takes care of your original question, please click on "Thread Tools" from the menu link (just above the first post in the thread) and mark this thread as SOLVED.

  8. #8
    Registered User
    Join Date
    12-08-2023
    Location
    Barcelona, Spain
    MS-Off Ver
    Excel 2010
    Posts
    5

    Re: Search letters and numbers to see if exist in another column by at least 7 characters

    Thank you Glenn and Hans, I was not aware the difference between the two excel version, apologize for that. I will learn a lot of my very first posted issue here.

    I am very newbie to create formulas and I still do not get it to work, changing the SEQUENCE(10) with ROW($1:$10) and doing the command afterwards.

    It still gives me No match as a result.

    If I type ROW($1:$100) it will take 100 rows I assume also, as I do not know how many rows I will have yet.
    Is it also taking into account the length may vary, it will not be as the example always using just 10 characters? They are also not on the same row, the matching characters can be anywhere in the columns.

    Thank you!
    Last edited by MaryMaria; 12-08-2023 at 05:32 PM.

  9. #9
    Forum Guru HansDouwe's Avatar
    Join Date
    06-21-2022
    Location
    Nederland
    MS-Off Ver
    365 V2403 (Build 17330.20000)
    Posts
    6,427

    Re: Search letters and numbers to see if exist in another column by at least 7 characters

    SEQUENCE(10) and ROW($1:$10) in the function MID refers to the individual characters.

    If the ids are not always 10 characters, you need a formula that takes a variable length into account.

    Please try in D2 and copy down:
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Confirm the formula with Ctrl+Shift+Enter
    Attached Files Attached Files

  10. #10
    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,053

    Re: Search letters and numbers to see if exist in another column by at least 7 characters

    Hopefully, Hans' formula will do what you want. If not... and DEFINITELY for next time, please take care to produce a REPRESENTATIVE sample sheet that reflects what you have (different length strings, different rows, matches and no matches, etc, etc).

    that will make it ieaser for us to understand your problem and help you.

    Please amend your profile to show your current Excel product. "mac- pages" means nothing.

  11. #11
    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,848

    Re: Search letters and numbers to see if exist in another column by at least 7 characters

    I am now trying in Excel 2010.
    You said you were using Numbers and now Excel 2010 - which is it? Whichever it is needs to be in your forum profile.

  12. #12
    Registered User
    Join Date
    12-08-2023
    Location
    Barcelona, Spain
    MS-Off Ver
    Excel 2010
    Posts
    5

    Re: Search letters and numbers to see if exist in another column by at least 7 characters

    Greatly appreciate all the help in solving this formula issue , special thanks to Glenn and Hans for the patience you have and the time put in to help me.

  13. #13
    Forum Guru HansDouwe's Avatar
    Join Date
    06-21-2022
    Location
    Nederland
    MS-Off Ver
    365 V2403 (Build 17330.20000)
    Posts
    6,427

    Re: Search letters and numbers to see if exist in another column by at least 7 characters

    You are Welcome! Thanks for the feedback and rep. Glad to have helped .

+ 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] Search Button - Finds Part Numbers with numbers, letters and characters
    By Kyhosa in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-13-2021, 12:28 PM
  2. Replies: 11
    Last Post: 12-01-2017, 12:47 PM
  3. Selecting letters/characters/numbers separately for a filter
    By WasWodge in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 12-08-2014, 09:12 PM
  4. Replies: 1
    Last Post: 08-27-2014, 11:05 AM
  5. [SOLVED] Search column for location of characters/numbers in cells with different digit lengths
    By nbhowe in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 02-08-2013, 05:38 PM
  6. Replies: 4
    Last Post: 08-06-2012, 11:52 AM
  7. Count specific characters with numbers or letters
    By hoppscrouse in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 10-19-2007, 09:02 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