+ Reply to Thread
Results 1 to 4 of 4

Compare two cells - determine if string in cell 2 is contained within string in cell 1

  1. #1
    Registered User
    Join Date
    09-03-2012
    Location
    Online
    MS-Off Ver
    Excel 2016
    Posts
    48

    Compare two cells - determine if string in cell 2 is contained within string in cell 1

    Hello all,

    Despite much help searching, trial and error, and googling I can't seem to find a reliable method of performing this funtion. I've tried modifying some =if( statements I've found and also a few loops for macros, to no effect.

    I have a sheet that contains a list of file names, and also a list of ID's. Id like to be able to determine if the ID is found within the file name. I've been toying with the InStr function, but can't seem to achieve what I'm after.

    So, in the image below I'd like to assess if the contents of the cell in row 2 of Column D is contained within the contents of cell 2 in Column B.

    \1

    Thank you all

  2. #2
    Valued Forum Contributor
    Join Date
    02-09-2012
    Location
    Mauritius
    MS-Off Ver
    Excel 2007
    Posts
    1,055

    Re: Compare two cells - determine if string in cell 2 is contained within string in cell

    Hi.

    Try this:

    Please Login or Register  to view this content.
    Click *, if my suggestion helps you. Have a good day!!

  3. #3
    Registered User
    Join Date
    09-03-2012
    Location
    Online
    MS-Off Ver
    Excel 2016
    Posts
    48

    Re: Compare two cells - determine if string in cell 2 is contained within string in cell

    Thank you jrar1106!

    It seems so easy when you know how. I guess I was going about it the wrong way with InStr.

  4. #4
    Valued Forum Contributor
    Join Date
    02-09-2012
    Location
    Mauritius
    MS-Off Ver
    Excel 2007
    Posts
    1,055

    Re: Compare two cells - determine if string in cell 2 is contained within string in cell

    Happy to help you Anakaine!

    Have a good day!!

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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