+ Reply to Thread
Results 1 to 8 of 8

Cannot find text data within cell containing VLOOKUP formula

  1. #1
    Registered User
    Join Date
    03-20-2015
    Location
    Orlando, Florida
    MS-Off Ver
    Office 2010
    Posts
    5

    Post Cannot find text data within cell containing VLOOKUP formula

    I am using VLOOKUP to import text from one spreadsheet into another. After the lookup I want to search the imported data within the cells for the imported text. The find function (cell.find) cannot see the text within the cells which contain the VLOOKUP formula. Of course when you look at the cell it appears to have the text. How do I get the find function to recognize the imported text and not just look at the formula the cell contains?

    Here is the code I am using:

    Please Login or Register  to view this content.
    Last edited by pvor; 03-20-2015 at 01:32 PM.

  2. #2
    Forum Expert
    Join Date
    08-28-2014
    Location
    Texas, USA
    MS-Off Ver
    2016
    Posts
    1,796

    Re: Cannot find text data within cell containing VLOOKUP formula

    Please put your code in CODE tags so that it appears like my code below. In the text editor, highlight your code, then press the # button in the toolbar.

    Anyway, you're having an issue because you're expressly telling .Find to look at the formulas, not at the value the formula results in.

    Fixing that should be as simple as changing

    Please Login or Register  to view this content.
    to

    Please Login or Register  to view this content.

  3. #3
    Registered User
    Join Date
    03-20-2015
    Location
    Orlando, Florida
    MS-Off Ver
    Office 2010
    Posts
    5

    Re: Cannot find text data within cell containing VLOOKUP formula

    Thanks for your input. I revised my post as you suggested. I tried changing the xlFormulas to xlValues as you suggested but there was no change.

    pvor

  4. #4
    Forum Expert
    Join Date
    08-28-2014
    Location
    Texas, USA
    MS-Off Ver
    2016
    Posts
    1,796

    Re: Cannot find text data within cell containing VLOOKUP formula

    Can you post an example workbook that demonstrates the issue you're having?

  5. #5
    Registered User
    Join Date
    03-20-2015
    Location
    Orlando, Florida
    MS-Off Ver
    Office 2010
    Posts
    5

    Re: Cannot find text data within cell containing VLOOKUP formula

    Here is the code for the example I attached.

    Please Login or Register  to view this content.
    Attached Files Attached Files

  6. #6
    Forum Expert
    Join Date
    08-28-2014
    Location
    Texas, USA
    MS-Off Ver
    2016
    Posts
    1,796

    Re: Cannot find text data within cell containing VLOOKUP formula

    You need to change the xlFormulas to xlValues in the line after sheet2 select

  7. #7
    Registered User
    Join Date
    03-20-2015
    Location
    Orlando, Florida
    MS-Off Ver
    Office 2010
    Posts
    5

    Re: Cannot find text data within cell containing VLOOKUP formula

    Thanks for your help. I did find that there was another issue which prevented the original code from working. It seems that the Cells.Find function has a problem with finding text which has either an underscore or a hyphen within the text when it is not the directly entered text. I tried to find "Win_TS" indirectly, then I just changed it to "Win" and it found the text with no problem. Changing to xlValues did work to find the text as you said.

    Thanks again for your valuable help!!

  8. #8
    Forum Expert
    Join Date
    08-28-2014
    Location
    Texas, USA
    MS-Off Ver
    2016
    Posts
    1,796

    Re: Cannot find text data within cell containing VLOOKUP formula

    Glad to help. Please mark this thread as SOLVED, and any reputation (the * in the lower left of my posts) is appreciated.

+ 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 vlookup to find text on different sheet. (Text will not always in the same cell)
    By onlyconnect in forum Excel - New Users/Basics
    Replies: 1
    Last Post: 04-14-2014, 11:33 AM
  2. Formula to find and return text string within a cell full of text strings
    By LightingPop in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 12-03-2013, 11:45 PM
  3. [SOLVED] Trying to find a formula to find a random $ amount in a text in a cell
    By Miki1 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 01-28-2013, 10:13 PM
  4. Replies: 0
    Last Post: 09-26-2012, 02:02 PM
  5. Find specific text within a cell using IF and VLOOKUP vba
    By dean.rogers in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 04-10-2012, 12:37 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