+ Reply to Thread
Results 1 to 7 of 7

Comparing known data to text string

  1. #1
    Registered User
    Join Date
    03-17-2023
    Location
    Texas
    MS-Off Ver
    Office 365
    Posts
    3

    Comparing known data to text string

    Hello

    I want to be able to take supplied data from another team and compare it to known data on my end. The supplied data isnt always in the same format but it should always include a portion of the known data on my end.

    Example:
    Column A contains known data. Example: DEF456DEF
    Column B contains known data that relates to column A. Example: RST456RST
    Column C contains supplied data. Example: CKWXLE.SKE_DEF456_XKJKJ20
    Column D would contain the output. Using the examples below, the output would be RST456RST.

    Column A and B would have over 1000 rows containing known data. The supplied data could be anywhere from 50 rows to 500 rows of data. So I'd want to take each row any column C and compare it to all data in column A. If a match is found, column D would populate with the info from the same row in column B.

    The only way I could get this to work was a VLOOKUP using wildcards but I had to edit the supplied data text in order for a match to be made. I dont have the time to edit each row everytime new data is received. I just want to compare what is provided to known and if any text matches, update column D with info from column B. Any/all help would be greatly appreciated.

    Thanks in advance
    David
    Attached Images Attached Images

  2. #2
    Forum Expert
    Join Date
    02-10-2019
    Location
    Georgia, USA
    MS-Off Ver
    Office 365
    Posts
    3,195

    Re: Comparing known data to text string

    Please read the yellow banner at the top of the page and supply a good example workbook.

  3. #3
    Registered User
    Join Date
    03-17-2023
    Location
    Texas
    MS-Off Ver
    Office 365
    Posts
    3

    Re: Comparing known data to text string

    Sorry about that....thank you for the correction.
    Attached Files Attached Files

  4. #4
    Forum Expert
    Join Date
    02-10-2019
    Location
    Georgia, USA
    MS-Off Ver
    Office 365
    Posts
    3,195

    Re: Comparing known data to text string

    Do you really mean, "If ANY of the text matches..."?

    Cell C7 contains "456" which also matches the "456" in ABC456ABC. There's a "3" in cell C7 also, which matches ABC123ABC. So according to your logic, the result in D7 should be "XYZ123XYZ"
    I think you want to have more constraints on what matches.

  5. #5
    Forum Expert
    Join Date
    04-14-2009
    Location
    Taiwan
    MS-Off Ver
    Excel 2016,2019,O365
    Posts
    2,908

    Re: Comparing known data to text string

    Maybe,

    D7
    =IF(C7="","",INDEX(B:B,AGGREGATE(15,6,ROW($A$7:$A$100)/ISNUMBER(FIND(TEXTSPLIT(C7,{"."," ","_"}),$A$7:$A$100)),1)))

    copied down.
    Attached Files Attached Files

  6. #6
    Registered User
    Join Date
    03-17-2023
    Location
    Texas
    MS-Off Ver
    Office 365
    Posts
    3

    Re: Comparing known data to text string

    windknife....thank you so much! that works perfectly.

  7. #7
    Forum Expert
    Join Date
    04-14-2009
    Location
    Taiwan
    MS-Off Ver
    Excel 2016,2019,O365
    Posts
    2,908

    Re: Comparing known data to text string

    You are welcom.

+ 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. Comparing text string
    By MartinSvanis in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 04-13-2022, 03:05 PM
  2. Comparing text between string arrays and values in column
    By mustafasb in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 08-03-2017, 02:53 AM
  3. [SOLVED] Data Validation: Comparing 2 timestamps - If time, then may not =, if string, then allowed
    By LeafyShroom in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 02-17-2017, 02:56 PM
  4. Finding a date in a text string and comparing it to a date range
    By ABARAN1000 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 11-05-2012, 02:55 PM
  5. [SOLVED] Translate form data into a text string and output that string into a preformated length
    By TJ Saulnier in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 03-19-2012, 03:58 PM
  6. Searching & comparing text string in 2 columns
    By Murph in forum Excel General
    Replies: 10
    Last Post: 04-08-2011, 11:02 AM
  7. Comparing a string to a text file
    By Yerushalmi in forum Excel General
    Replies: 10
    Last Post: 12-06-2010, 04:42 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