+ Reply to Thread
Results 1 to 4 of 4

Test if contents in one cell exist inside a different multiline cell

  1. #1
    Registered User
    Join Date
    07-18-2024
    Location
    United States
    MS-Off Ver
    MS 365
    Posts
    17

    Test if contents in one cell exist inside a different multiline cell

    Hello all, I am a mechanical engineering intern doing stuff in excel so forgive me if this is super simple. I have a file with about 2K lines of code to do various things like compare files, highlight differences, check for similarities etc.

    I am running into an issue with an expansion of functionality that is being requested. In the original files each cell only had 1 string of data in each cell so my comparison tool essentially did

    Please Login or Register  to view this content.
    I am now being given a file with multi lines of text. I have attached an example folder but the gist of what I need is this.
    I have a set of data and on a different sheet a dependent drop down filter. The user selects the data to filter through and the filer program goes through each line in the appropriate column on the data sheet and brings it over to the filter sheet. I have code for everything except how to get the filter to look through each line in the multiline cell as a separate line
    if someone has an idea for code that would be similar to
    Please Login or Register  to view this content.
    I have no idea in this pseudo-code how to get the variables linecount or actual_data. If anyone knows how to get those two variables I would appreciate it greatly and believe I can figure the rest of it out from there.

    Example file of what I intend to make the final result resemble is here Drop Down Test.xlsm
    Last edited by MDLovitt; 10-31-2024 at 04:22 PM.

  2. #2
    Forum Expert Mumps1's Avatar
    Join Date
    10-10-2012
    Location
    Toronto, Canada
    MS-Off Ver
    Excel 2010, 365
    Posts
    8,007

    Re: Test if contents in one cell exist inside a different multiline cell

    I'm not sure if I understood correctly but try the following:
    Copy and paste this macro into the worksheet code module. Do the following: right click the tab name for your "Filter" sheet and click 'View Code'. Paste the macro into the empty code window that opens up. Close the code window to return to your sheet. Make a selection in cell A4.
    Please Login or Register  to view this content.
    You can say "THANK YOU" for help received by clicking the Star symbol at the bottom left of the helper's post.
    Practice makes perfect. I'm very far from perfect so I'm still practising.

  3. #3
    Registered User
    Join Date
    07-18-2024
    Location
    United States
    MS-Off Ver
    MS 365
    Posts
    17

    Re: Test if contents in one cell exist inside a different multiline cell

    That works really well actually. I ended up realizing that I didnt need to search each line of a multiline cell I could just use
    Please Login or Register  to view this content.
    to accomplish what I needed but your solution is really elegant. Thank you for taking the time to show it to me.

  4. #4
    Forum Expert Mumps1's Avatar
    Join Date
    10-10-2012
    Location
    Toronto, Canada
    MS-Off Ver
    Excel 2010, 365
    Posts
    8,007

    Re: Test if contents in one cell exist inside a different multiline cell

    You are very welcome.

+ 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] vba to test value of a cell and move cell contents
    By deek in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 05-28-2016, 10:18 AM
  2. [SOLVED] Remove contents from a cell if duplicates exist in a different column
    By brianharmon25 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 09-16-2015, 01:55 AM
  3. Test Cell for contents
    By stuartgb100 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 05-12-2015, 03:23 PM
  4. Conditional Formatting: highlight if cell contents do not exist in range
    By Bjordion in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 03-28-2012, 04:16 PM
  5. IF statement to test the contents of a cell
    By Dowsey1977 in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 01-21-2010, 12:44 PM
  6. Test if Cell is Empty or Doesn't Exist
    By scott in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 02-07-2005, 07:06 PM
  7. Test is cell contents are a URL
    By Jim in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-18-2005, 02:06 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