+ Reply to Thread
Results 1 to 7 of 7

Matching Extracted Number with an Array of Extracted Numbers

  1. #1
    Forum Contributor
    Join Date
    04-02-2012
    Location
    cape town
    MS-Off Ver
    Excel 365 Subscription
    Posts
    120

    Matching Extracted Number with an Array of Extracted Numbers

    Hi All,

    I have attached a small sample spreadsheet.

    Not sure if my subject header is a clear description of what I want to solve, but nonetheless here goes:

    In Sheet1, for each row, I would like to extract the 5 digit number (which is between brackets) from the description in Column B. Then compare it against an array of similarly extracted 5 digit numbers from Column B in Sheet2.

    Then, if there is a match, place the number in column I of Sheet1 into column K in Sheet1

    I need to have a formula in each row of Column K in Sheet1 which does all of the above and not have separate columns for the extraction process as I have in the sample spreadsheet.

    Hope this description is clearer than mud!!

    Any help would be appreciated.
    Attached Files Attached Files

  2. #2
    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. 2406 (Windows 11 23H2 64-bit)
    Posts
    82,482

    Re: Matching Extracted Number with an Array of Extracted Numbers

    Here's how to do it WITHOUT the extracted code column on the results sheet:

    =IFERROR(LOOKUP(1000,SEARCH(Sheet2!$F$4:$F$30,B3),I3),0)

    or WITHOUT the extracted code column on the lookup sheet:

    =IFERROR(LOOKUP(1000,SEARCH(G3,Sheet2!$B$4:$B$30),I3),0)

    If you want to keep BOTH extracted code columns:

    =IF(COUNTIF(Sheet2!$F$4:$F$30,G3)=0,0,I3)
    Last edited by AliGW; 10-12-2021 at 04:20 AM.
    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.

  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. 2406 (Windows 11 23H2 64-bit)
    Posts
    82,482

    Re: Matching Extracted Number with an Array of Extracted Numbers

    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED.

    Also, you may not be aware that you can thank those who have helped you by clicking the small star icon located in the lower left corner of the post in which the help was given. By doing so you can add to the reputation(s) of all those who offered help.

  4. #4
    Valued Forum Contributor
    Join Date
    02-06-2013
    Location
    UK
    MS-Off Ver
    365
    Posts
    580

    Re: Matching Extracted Number with an Array of Extracted Numbers

    How does the data set make sense?
    The description and extraced code in Sheet1 are all duplicates.

    Not sure if this what you had in mind, since you're on Office 365, this should work:
    =ISNUMBER(MATCH(MID(B3:B8,SEARCH("(?????)",B3:B8)+1,5),MID(Sheet2!B4:B30,SEARCH("(?????)",Sheet2!B4:B30)+1,5),))*I3:I8

  5. #5
    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. 2406 (Windows 11 23H2 64-bit)
    Posts
    82,482

    Re: Matching Extracted Number with an Array of Extracted Numbers

    @Mark

    You've looked twice now - any feedback for us?

  6. #6
    Forum Contributor
    Join Date
    04-02-2012
    Location
    cape town
    MS-Off Ver
    Excel 365 Subscription
    Posts
    120

    Re: Matching Extracted Number with an Array of Extracted Numbers

    Thanks to Both AliGW and RaulSerg.

  7. #7
    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. 2406 (Windows 11 23H2 64-bit)
    Posts
    82,482

    Re: Matching Extracted Number with an Array of Extracted Numbers

    Thanks for the feedback - glad to help.

+ 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 all text in bold - replace with GAP - add extracted words to an array/column
    By codeBeast in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 05-05-2021, 12:27 PM
  2. [SOLVED] Subtracting Extracted numbers from a string
    By JeffGrant in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 04-23-2021, 08:48 AM
  3. Subtotal not working in array extracted database
    By abidur in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 01-04-2021, 03:22 AM
  4. [SOLVED] Numbers with percentage to be extracted from text
    By ImranBhatti in forum Excel Formulas & Functions
    Replies: 19
    Last Post: 11-28-2019, 04:04 PM
  5. [SOLVED] Amount of number extracted depending on time period
    By Allerdrengen in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 02-20-2019, 11:27 AM
  6. Excel 2007 : Numbers to be extracted
    By sushil10s in forum Excel General
    Replies: 5
    Last Post: 08-20-2015, 09:07 AM
  7. Replies: 7
    Last Post: 08-25-2012, 12:53 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