+ Reply to Thread
Results 1 to 5 of 5

VBA / Macro help needed for matching partial text string

  1. #1
    Forum Contributor
    Join Date
    10-30-2011
    Location
    Doha
    MS-Off Ver
    MS office 365
    Posts
    701

    Question VBA / Macro help needed for matching partial text string

    Folks,

    I need a macro to give returs in Column F as "Completed" if Column A and E cell values partial text string is matching. I have attached the excel file of what I'm trying to accomplish.

    Thanks in advance for your expertise!
    Attached Files Attached Files
    Cheers,

    Joshi
    Being with a winner makes you a winner

  2. #2
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: VBA / Macro help needed for matching partial text string

    You E2 value looks like you really just want to strip out the AGQ leader and test the rest to see if it exists in A2? IF so, put this formula in F2, then copy down:

    =IF(ISNUMBER(SEARCH(SUBSTITUTE(E2, "AGQ", ""), A2)), "Completed", "")
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

  3. #3
    Forum Contributor
    Join Date
    10-30-2011
    Location
    Doha
    MS-Off Ver
    MS office 365
    Posts
    701

    Re: VBA / Macro help needed for matching partial text string

    Hi Jerry,

    Thank you so much its working perfect. One more help please, if I add new values in Column A and E then I need the formula in F Column get fill down automatically. Is it possible?

    Thanks once again.

    Joshi

  4. #4
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: VBA / Macro help needed for matching partial text string

    1) Just put the formula in that column now and copy it down as far as you want so it's already there? In that case you might want to change it to:

    =IFERROR(IF(ISNUMBER(SEARCH(SUBSTITUTE(E2, "AGQ", ""), A2)), "Completed", ""), "")



    2) Highlight your table in A:F, then press CTRL -L to convert it to an Excel LIST (or Table).

    Video example

  5. #5
    Forum Contributor
    Join Date
    10-30-2011
    Location
    Doha
    MS-Off Ver
    MS office 365
    Posts
    701

    Re: VBA / Macro help needed for matching partial text string

    Hi Jerey,
    Sorry I forgot to tell you, Some times the row value may vary. Hence we need a Vlookup to look all Column A cell values (i.e if E2 value matching with A4 then F2 returns should be "Completed"). Sorry I should tell this in the first post. Can you please advise whether this can be done.

    Thanks,
    joshi

  6. #6
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: VBA / Macro help needed for matching partial text string

    Change the F2 formula to:

    =IFERROR(IF(ISNUMBER(MATCH("*"&SUBSTITUTE(E2, "AGQ", "")&"*",A:A, 0)), "Completed", ""), "")

  7. #7
    Forum Contributor
    Join Date
    10-30-2011
    Location
    Doha
    MS-Off Ver
    MS office 365
    Posts
    701

    Re: VBA / Macro help needed for matching partial text string

    Thank you so much Jerry,

    Its amazing.

    Joshi

+ 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] Find partial text string within another text string return original text into cell.
    By mikey42979 in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 06-17-2013, 02:58 PM
  2. [SOLVED] Search for a partial string match and cycle through matching results
    By kamelkid2 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 03-08-2013, 08:27 AM
  3. Complex matching with indirect lookup based on partial string match
    By jdcb in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 08-17-2012, 08:19 AM
  4. matching partial text within one cell to partial text within another
    By Solstice in forum Excel - New Users/Basics
    Replies: 4
    Last Post: 03-03-2010, 09:13 PM
  5. prevent advanced filter matching partial string
    By martindwilson in forum Excel General
    Replies: 6
    Last Post: 08-25-2009, 10:15 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