+ Reply to Thread
Results 1 to 6 of 6

INDEX MATCH with MID or REPLACE

  1. #1
    Registered User
    Join Date
    08-16-2016
    Location
    Cape Town, South Africa
    MS-Off Ver
    2013
    Posts
    9

    INDEX MATCH with MID or REPLACE

    Hello!

    I am trying to use a standard INDEX MATCH formula but where it only matches the cell data (matched cell) from the 7th digit to the end of the string (variable length), to a matching cell in a designated column where the data also only needs to match from the 7th digit to the end of the string (variable length) for all cells in that column.

    I tried this:
    =INDEX('EEU Final'!$C$2:$C$6000,MATCH(REPLACE(O2,1,6,""),REPLACE('EEU Final'!$O$2:$O$6000,1,6,""),0))

    But clearly I havn't quite landed it. By the way i tried a different attempt with MID but that didn't work either.

    Any help would be greatly appreciated!

    Thank you in advance.

    Warm regards,
    Emile

  2. #2
    Forum Moderator jeffreybrown's Avatar
    Join Date
    02-19-2009
    Location
    Cibolo, TX
    MS-Off Ver
    Office 365
    Posts
    10,316

    Re: INDEX MATCH with MID or REPLACE

    Can you attach a small sample of what you have and what you expect?

    Attach a sample workbook. Make sure there is just enough data to demonstrate your need. Include a BEFORE sheet and an AFTER sheet in the workbook if needed to show the process you're trying to complete or automate. Make sure your desired results are shown, mock them up manually if necessary.

    Remember to desensitize the data.

    Click on GO ADVANCED and then scroll down to Manage Attachments to open the upload window.
    HTH
    Regards, Jeff

  3. #3
    Registered User
    Join Date
    08-16-2016
    Location
    Cape Town, South Africa
    MS-Off Ver
    2013
    Posts
    9

    Re: INDEX MATCH with MID or REPLACE

    Hi Jeff, sorry my columns got mangled in my last attempt to paste from Word. Please ignore the dashes - they are just space keepers.

    Sheet 1

    a-----------------------B--------------C---------------D
    FTFTFT65TR----------77
    FTFTFTUI876---------34
    FTFTFT0009TYU------49
    FTFTFTIR55----------99


    Sheet 2
    A-----------------------B--------------C---------------D
    XYZXYZIR55-----------?
    XYZXYZ65TY
    XYZXYZTREE98



    I am using INDEX MATCH to find B2 in sheet 2, by excluding the first 6 digits of A2 (Sheet 2) as well as the first 6 digits of Sheet 1 column A. So the formula for Sheet2 B2 should return 99.
    Last edited by Emile du Toit; 06-12-2017 at 12:35 PM.

  4. #4
    Forum Moderator jeffreybrown's Avatar
    Join Date
    02-19-2009
    Location
    Cibolo, TX
    MS-Off Ver
    Office 365
    Posts
    10,316

    Re: INDEX MATCH with MID or REPLACE

    Try in B2 of Sheet2...

    =IFERROR(INDEX(Sheet1!$B$1:$B$4,MATCH(MID($A1,7,99),MID(Sheet1!$A$1:$A$4,7,99),0)),"")

    IMPORTANT
    • This is an array formula
    • Enter the formula >> press F2 then >> CTRL + SHIFT + ENTER
    • If entered correctly, the formula will be enclosed in {brackets}
    • Do not enter the {brackets} manually

  5. #5
    Registered User
    Join Date
    08-16-2016
    Location
    Cape Town, South Africa
    MS-Off Ver
    2013
    Posts
    9

    Re: INDEX MATCH with MID or REPLACE

    Thanks so much Jeff! Would you believe that I actually had got it correct at one stage using MID(without the ISERROR part), but whenever I hit 'ENTER' it showed BLANK. I didn't realize that this was an ARRAY formula! I must clearly read up more on what they are, as i understand that they have to do with when excel has to do one calculation before another, but I had no idea this was one of those situations. I actually think this might explain other incidences with formulas when Excel didn't register an error but insisted on giving the value as BLANK.

    Anyhow, so DOUBLY Thank You!

  6. #6
    Forum Moderator jeffreybrown's Avatar
    Join Date
    02-19-2009
    Location
    Cibolo, TX
    MS-Off Ver
    Office 365
    Posts
    10,316

    Re: INDEX MATCH with MID or REPLACE

    You are very welcome. Glad it worked out for you!

+ 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] using Index match in replace of vlookup
    By srinivasan1965 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 01-23-2016, 07:58 AM
  2. [SOLVED] How to replace VLOOKUP with INDEX and MATCH
    By jackson_hollon in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 12-06-2014, 04:38 PM
  3. Index, Match, Left & or Replace needs refining
    By julhs in forum Excel General
    Replies: 4
    Last Post: 01-31-2012, 08:03 PM
  4. Match and replace with index
    By prayami in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 08-26-2011, 08:51 PM
  5. Match, Index, Data replace.
    By JapanDave in forum Excel General
    Replies: 3
    Last Post: 08-01-2011, 12:52 AM
  6. Replace #N/A using Index Match function
    By karstens in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 09-01-2006, 03:04 PM
  7. index/match/replace
    By InventoryQueryGuy in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 07-13-2006, 11:10 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