+ Reply to Thread
Results 1 to 4 of 4

vba to replace string from exact match list by searching approximate value

  1. #1
    Forum Contributor
    Join Date
    04-30-2013
    Location
    washington
    MS-Off Ver
    Excel 2019
    Posts
    168

    vba to replace string from exact match list by searching approximate value

    Dear experts

    I have list of data in col G:G Which comes along with key code words need to replace by approximate match string values of text.

    some time with in cell contains multiple code values P22, P28,P29, P30 result should M&A


    like Withholding Tax - CODE word is C44 : Miscellanious expense - C44 Expected result (Miscellaneous ( within EMEA trf) - C44)

    Find the attachment
    Attached Files Attached Files

  2. #2
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,770

    Re: vba to replace string from exact match list by searching approximate value

    In H2 Cell


    =IFERROR(LOOKUP(2,1/SEARCH($A$3:$A$19,G2),$B$3:$B$19),G2)


    Drag it down


    If your problem is solved, then please mark the thread as SOLVED>>Above your first post>>Thread Tools>>
    Mark your thread as Solved


    If the suggestion helps you, then Click *below to Add Reputation

  3. #3
    Forum Contributor
    Join Date
    04-30-2013
    Location
    washington
    MS-Off Ver
    Excel 2019
    Posts
    168

    Re: vba to replace string from exact match list by searching approximate value

    Dear sir

    can i have vba? i want get value replace on same col G:G
    Last edited by johnlara; 11-18-2015 at 10:05 AM. Reason: reason

  4. #4
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,770

    Re: vba to replace string from exact match list by searching approximate value

    How to install your new code
    1. Copy the Excel VBA code
    2. Select the workbook in which you want to store the Excel VBA code
    3. Press Alt+F11 to open the Visual Basic Editor
    4. Choose Insert > Module
    5. Edit > Paste the macro into the module that appeared
    6. Close the VBEditor
    7. Save your workbook (Excel 2007+ select a macro-enabled file format, like *.xlsm)

    Please Login or Register  to view this content.

+ 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: 0
    Last Post: 01-21-2015, 07:05 AM
  2. Search for exact match of string and highlight
    By Niclal in forum Excel Programming / VBA / Macros
    Replies: 14
    Last Post: 10-15-2014, 12:07 PM
  3. [SOLVED] Find and replace with exact string
    By carrie.cllek in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 11-27-2013, 04:02 PM
  4. [SOLVED] Return approximate value when exact value was not equal to the criterion
    By marreco in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 01-18-2013, 10:56 PM
  5. Searching a list and finding the exact match from a sublist
    By Lattaio23 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 05-03-2012, 11:19 AM
  6. Replace Exact String Portion
    By MCCCLXXXV in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 11-16-2011, 11:36 AM
  7. Searching Range for Exact Match
    By SATEAT in forum Excel General
    Replies: 4
    Last Post: 05-20-2010, 07:14 PM

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