+ Reply to Thread
Results 1 to 9 of 9

2 Part Complex Formula for Matching Multiple Results

  1. #1
    Registered User
    Join Date
    11-19-2020
    Location
    Las Vegas, NV
    MS-Off Ver
    O365
    Posts
    5

    2 Part Complex Formula for Matching Multiple Results

    I have been working on a 2 Part Complex Formula for Matching Multiple Results for a few weeks and having some issues getting the correct formula written. Below are the two parts that I am having issues with:

    1.) MATCH: I am looking to leverage the MATCH function to pull a row number for a partial-exact match of data within a cell. For example, I am trying pull results for cells containing the text "SI-4".

    Below is an example of a cell I would want it to match:
    ""SC-7(19), SI-4, SI-4(1), SI-4(2), SI-4(4), SI-4(5), SI-4(7), SI-4(9), SI-4(11), SI-4(12), SI-7, SI-7(1), SI-7(7)""

    Below is an example of a cell that should NOT be matched:
    "AC-18, SI-4(14), SI-4(15)"

    To match the "SI-4" data within the cell, I was using the "*"&SI-4&"*", but leverage those wild cards pulls also matches the second cell which it should not. I though that only using the wild card option before the content would produce the correct results, but it does not.

    2.) INDEX + MATCH/OFFSET: Once I am able to resolve the situation above, I would be interested in writing a formula to include both INDEX + MATCH. Right now I am primarily using MATCH/OFFSET as a helper function to pull row data and then using the INDEX function to pull multiple results from with a table.

    Any help with getting this resolved would be greatly appreciated!

  2. #2
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    It changes constantly, but based in Ireland.
    MS-Off Ver
    µSoft Office 365. Learning Excel all over again!!
    Posts
    27,090

    Re: 2 Part Complex Formula for Matching Multiple Results

    Nahh! No idea what you're on about.

    Will you please attach a SMALL sample Excel workbook (10-20 rows of data is usually enough)? However, please give us an indication of the approximate number of rows of data you want the solution to work with (100, 1000, 100,000 or whatever). Please DO NOT attach a picture of an Excel sheet (I do not have the patience to re-type any/all your stuff before starting).

    1. It does NOT have to be your real sheet - mock up a SAMPLE if you need to. But not 1000's of rows!!! It makes manual checking so tedious. Whatever you do... make sure that all confidential information is removed first!!

    2. Make sure that your sample data are truly REPRESENTATIVE of your real data. For example, don't show text in a column if it's really a number. The use of unrepresentative data is very frustrating and can lead to long delays in reaching a solution.

    3. Make sure that your desired solution is also shown (mock up the results manually). To be honest, I am not interested in seeing a non-working formula... or a pile of blank cells. However, I am very interested in seeing your EXPECTED results in their EXPECTED location.

    4. Try not to use merged cells. They cause lots of problems and are DEFINITELY best avoided!

    Unfortunately the attachment icon doesn't work at the moment. So,... instead click on Go Advanced (below the Edit Window) while composing your reply, then scroll down to and click on Manage Attachments and the Upload window will open. Click on Browse and navigate to (and double-click) the file icon that you want to attach, then click on Upload and then on Close this Window to return to the Edit window. When you have finished composing your post, click on Submit Post.
    Glenn



  3. #3
    Forum Expert bebo021999's Avatar
    Join Date
    07-22-2011
    Location
    Vietnam
    MS-Off Ver
    Excel 2016
    Posts
    6,984

    Re: 2 Part Complex Formula for Matching Multiple Results

    Firstly, using MATCH to seek for partial/exact string in text string may be in wrong way.
    Second, with "SI-4" and "SI-4(n)", try to search: "SI-4,"
    In stead of MATCH, they usually use SEARCH/FIND:
    with string in B1:
    "SC-7(19), SI-4, SI-4(1), SI-4(2), SI-4(4), SI-4(5), SI-4(7), SI-4(9), SI-4(11), SI-4(12), SI-7, SI-7(1), SI-7(7)"
    =SEARCH("SI-4,",B1) gives 11 (11th character from left)
    then testing
    =ISNUMBER(SEARCH("SI-4,",B1)) gives TRUE

    I guess, with text in column B, you attempt to get list from column A those partial/exact match with "SI-4," in column B.

    If it true, try:

    Please Login or Register  to view this content.
    drag down
    Attached Files Attached Files

  4. #4
    Registered User
    Join Date
    11-19-2020
    Location
    Las Vegas, NV
    MS-Off Ver
    O365
    Posts
    5

    Re: 2 Part Complex Formula for Matching Multiple Results

    So maybe I am making this more complicated than it needs to be. Attached is a .xlsx file with the example data.

    The main goal I am trying to accomplish is to populate Column K (CJIS Security Policy (CSP) v5.6 Area) in the "Working CIS -> NIST 800-53 -> CJIS" tab with the mapping data from the "CJIS to NIST 800-53" tab. The key in the "Working CIS -> NIST 800-53 -> CJIS" tab is Column H (NIST Control Num) which is what will be used for the lookup in Column A (NIST SP 800-53 rev. 4 Control) matchign to Column B (CSP v5.6 Area) in the ""CJIS to NIST 800-53" tab.

    Currently, cell K4 in the "Working CIS -> NIST 800-53 -> CJIS" tab is correct, but the rest of the cells in that Column are not because the MATCH result I mentioned earlier.

    It would be the most beneficial to build a formula to do this automatically (see my ask #2 in my original post), but I built simple lookup calculator in the "Helper Data" to do this one at a time if needed.
    Attached Files Attached Files

  5. #5
    Registered User
    Join Date
    11-19-2020
    Location
    Las Vegas, NV
    MS-Off Ver
    O365
    Posts
    5

    Re: 2 Part Complex Formula for Matching Multiple Results

    bebo021999, thank you for your reply. In regards to the MATCH suggestion about using a "," if the text that is being searched is at the end of the content within a cell then it would not include a "," and therefore would not be included in the search results.

    I posted an example of the data below and included a more detailed explanation of what I am looking to accomplish if you would not mind taking a look at that for me?

  6. #6
    Forum Expert bebo021999's Avatar
    Join Date
    07-22-2011
    Location
    Vietnam
    MS-Off Ver
    Excel 2016
    Posts
    6,984

    Re: 2 Part Complex Formula for Matching Multiple Results

    I suggest 10 helper columns in "Working..."sheet, from L:U (can be expanded to the right) to extract list of CSP v5.6 with "SI-4," found.
    to prevent missing "SI-4" at the end of string, i use string&",", then "xxxx SI4" to become "xxxx SI-4,"
    Attached Files Attached Files

  7. #7
    Registered User
    Join Date
    11-19-2020
    Location
    Las Vegas, NV
    MS-Off Ver
    O365
    Posts
    5

    Re: 2 Part Complex Formula for Matching Multiple Results

    Thank you for looking into this and it looks like it should be working properly, but there is not any data being populated into Column K right now although there is a formula in there. Am I missing something as to what needs to be done next in order to have this column populated?

  8. #8
    Forum Expert bebo021999's Avatar
    Join Date
    07-22-2011
    Location
    Vietnam
    MS-Off Ver
    Excel 2016
    Posts
    6,984

    Re: 2 Part Complex Formula for Matching Multiple Results

    Could you upload file with error?

  9. #9
    Registered User
    Join Date
    11-19-2020
    Location
    Las Vegas, NV
    MS-Off Ver
    O365
    Posts
    5

    Re: 2 Part Complex Formula for Matching Multiple Results

    I am looking at the spreadsheet you sent over. I can see the Formula in Column K of the "Working CIS -> NIST 800-53 -> C" tab, but it is not populating it with any data.

+ 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] Two-Part Problem - Complex Formula and Conditional Formatting
    By g.costapinto in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 10-14-2019, 05:22 AM
  2. Formula to Pull Multiple Results from Column Matching Same Criteria
    By rfowl0106 in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 02-06-2019, 07:40 PM
  3. [SOLVED] Complex VLOOKUP of multiple records, adding results, and averaging them by record count
    By Aimee S. in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 04-10-2015, 10:12 AM
  4. [SOLVED] Complex IF function involving matching multiple criteria
    By adray13 in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 04-25-2013, 03:05 PM
  5. Matching up multiple part numbers with single price
    By sam_m in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 10-05-2010, 11:55 AM
  6. Replies: 3
    Last Post: 12-26-2008, 06:11 PM
  7. Replies: 7
    Last Post: 11-24-2008, 11:46 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