+ Reply to Thread
Results 1 to 12 of 12

Data matching formula needed!

Hybrid View

  1. #1
    Registered User
    Join Date
    01-21-2014
    Location
    London
    MS-Off Ver
    Excel 2007
    Posts
    5

    Red face Data matching formula needed!

    Hi all, this is my first post.

    I have 2 sets of data of computer models, and need find if the exact model in one column can be found (in full or in part) in another column.

    Vlookup won't do as it only gives me results if an exact match is found.

    So, if I have 'S391' in one column and 'S391-999' and 'S391-111' in the other column, I want that to return a positive match.

    Hopefully this is simple for you Excel wizards out there, and you're help is most appreciated!!

    Example attached, two tabs.

    Thanks,

    Rohan
    Attached Files Attached Files

  2. #2
    Valued Forum Contributor
    Join Date
    12-25-2013
    Location
    Singapore
    MS-Off Ver
    Excel 2016
    Posts
    506

    Re: Data matching formula needed!

    Hi Rohan, try this array formula in B2 and copy across B14:

    Formula: copy to clipboard
    Array Formula (CTRL+SHIFT+ENTER)
    {=IF(SUM(IF(ISERROR(SEARCH(A2,'all data'!$A$10:$A$25)),0,SEARCH(A2,'all data'!$A$10:$A$25)))>0,"Y","")}




    _______________________________________________________________________________________________________________________________
    1. Click on the * Add Reputation if you think someone helped you
    2. Mark your thread as SOLVED when question is resolved

    Alvin

  3. #3
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Data matching formula needed!

    Hi,

    One way

    Formula: copy to clipboard
    =MATCH("*"&A2&"*",'all data'!$A$1:$A$100,0)


    this will return the row number that contains the match
    Richard Buttrey

    RIP - d. 06/10/2022

    If any of the responses have helped then please consider rating them by clicking the small star icon below the post.

  4. #4
    Valued Forum Contributor
    Join Date
    12-25-2013
    Location
    Singapore
    MS-Off Ver
    Excel 2016
    Posts
    506

    Re: Data matching formula needed!

    Brilliant Richard! Totally forgotten about wildcard...

    Hi Rohan, in case you would like to hide the #N/A you can 'touched up' the formula as follow:
    Formula: copy to clipboard
    =IFERROR(MATCH("*"&A2&"*",'all data'!$A$1:$A$100,0),"")




    _______________________________________________________________________________________________________________________________
    1. Click on the * Add Reputation if you think someone helped you
    2. Mark your thread as SOLVED when question is resolved

    Alvin

  5. #5
    Registered User
    Join Date
    01-21-2014
    Location
    London
    MS-Off Ver
    Excel 2007
    Posts
    5

    Re: Data matching formula needed!

    Hi guys,

    Thanks for your answers.

    I tried pasting both formulas into my data but neither worked...

    Would it be possible for you to paste in to my file (attached) to show the result? I'm sure I'm doing something obvious incorrectly, but can't seem to make it work!

    Thanks guys, really appreciated if you can help.

    Rohan

  6. #6
    Valued Forum Contributor
    Join Date
    12-25-2013
    Location
    Singapore
    MS-Off Ver
    Excel 2016
    Posts
    506

    Re: Data matching formula needed!

    Perhaps we have different regional settings, try replace all commas with semicolons in those formulas working for you?



    _______________________________________________________________________________________________________________________________
    1. Click on the * Add Reputation if you think someone helped you
    2. Mark your thread as SOLVED when question is resolved

    Alvin

  7. #7
    Registered User
    Join Date
    01-21-2014
    Location
    London
    MS-Off Ver
    Excel 2007
    Posts
    5

    Re: Data matching formula needed!

    Hi Alvin,

    Changing to semicolons didn't make any difference, I'm afraid.

    When I paste {=IF(SUM(IF(ISERROR(SEARCH(A2,'all data'!$A$10:$A$25)),0,SEARCH(A2,'all data'!$A$10:$A$25)))>0,"Y","")}
    it just shows the formula as the text, above, not the results.

  8. #8
    Valued Forum Contributor
    Join Date
    12-25-2013
    Location
    Singapore
    MS-Off Ver
    Excel 2016
    Posts
    506

    Re: Data matching formula needed!

    Ah ok, the formula that I put up in post#2 was array formula. Just copy everything except for the curly bracket, and press ctrl+shift+enter (instead of enter) and the curly bracket will appear (indicating that this is an array formula).

    ps: for efficiency wise, use Richard solution instead



    _______________________________________________________________________________________________________________________________
    1. Click on the * Add Reputation if you think someone helped you
    2. Mark your thread as SOLVED when question is resolved

    Alvin

  9. #9
    Registered User
    Join Date
    01-21-2014
    Location
    London
    MS-Off Ver
    Excel 2007
    Posts
    5

    Re: Data matching formula needed!

    OK, so I tried it and it returns a Y for the first cell matched (awesome!) but when I dragged it down, all the other cells are blank. However, there should be matches...

    Nearly there... Thanks!

  10. #10
    Valued Forum Contributor
    Join Date
    12-25-2013
    Location
    Singapore
    MS-Off Ver
    Excel 2016
    Posts
    506

    Re: Data matching formula needed!

    I don't see other matched from your attachment, perhaps your actual file having much larger data range to be matched?
    If that's the case, remember to modify the formula to your search range.



    _______________________________________________________________________________________________________________________________
    1. Click on the * Add Reputation if you think someone helped you
    2. Mark your thread as SOLVED when question is resolved

    Alvin

  11. #11
    Registered User
    Join Date
    01-21-2014
    Location
    London
    MS-Off Ver
    Excel 2007
    Posts
    5

    Re: Data matching formula needed!

    It appears to be working now!

    Thank you both!

  12. #12
    Valued Forum Contributor
    Join Date
    12-25-2013
    Location
    Singapore
    MS-Off Ver
    Excel 2016
    Posts
    506

    Re: Data matching formula needed!

    You're welcome, glad to hear that you finally got it!



    _______________________________________________________________________________________________________________________________
    1. Click on the * Add Reputation if you think someone helped you
    2. Mark your thread as SOLVED when question is resolved

    Alvin

+ 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: 12
    Last Post: 01-31-2013, 03:30 PM
  2. Help Needed: VBA Code Matching
    By starcrostangel in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-29-2012, 07:32 PM
  3. Replies: 11
    Last Post: 02-10-2011, 08:13 AM
  4. Field matching formula help needed.
    By andysmith in forum Excel General
    Replies: 11
    Last Post: 05-13-2009, 07:58 AM
  5. Replies: 0
    Last Post: 04-02-2008, 12:19 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