+ Reply to Thread
Results 1 to 8 of 8

Lookup to Notepad?? Possible?

  1. #1
    Registered User
    Join Date
    07-12-2011
    Location
    Kildare,Ireland
    MS-Off Ver
    Excel 2010
    Posts
    59

    Lookup to Notepad?? Possible?

    Hey folks,
    I have a list of phone numbers, but it's in Notepad format, I have a second list of internal phone numbers and I want to check if my numbers are on the Notepad file?

    I know you can convert the notepad to excel and do a lookup, but the Notepad file is 245mb which equates to about 20M give or take a few numbers, so I don't want the hassle of converting it to excel and splitting it out into 20 odd sheets or workbooks and doing a lookup then...

    So question is, is it possible to do a lookup between excel and notepad without having to convert the notepad?

    Cheers!

    Dave

  2. #2
    Valued Forum Contributor
    Join Date
    05-08-2012
    Location
    Georgia, USA
    MS-Off Ver
    Excel 2003, 2010
    Posts
    811

    Re: Lookup to Notepad?? Possible?

    No, it isn't possible
    Click on star (*) below if this helps

  3. #3
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2010, 2019
    Posts
    40,689

    Re: Lookup to Notepad?? Possible?

    I have no idea if you can read a 245MB string ...

    Please Login or Register  to view this content.
    Run Init in the Open event, and then ...

    Please Login or Register  to view this content.
    Entia non sunt multiplicanda sine necessitate

  4. #4
    Registered User
    Join Date
    07-12-2011
    Location
    Kildare,Ireland
    MS-Off Ver
    Excel 2010
    Posts
    59

    Re: Lookup to Notepad?? Possible?

    Thanks for this, this may seem like a dumb question, I can get into the VBA coding (Alt+F11) but what do I need to do after that? I'm very new to VBA coding...
    Last edited by Cutter; 08-13-2012 at 04:53 PM. Reason: Removed whole post quote

  5. #5
    Forum Guru JosephP's Avatar
    Join Date
    03-27-2012
    Location
    Ut
    MS-Off Ver
    2003/10
    Posts
    7,328

    Re: Lookup to Notepad?? Possible?

    I'll be interested to see if shg's method works with a file that big. if it doesn't you could open a recordset from the file and then either load it into an array for searching or filter it repeatedly for each value in your worksheet
    Josie

    if at first you don't succeed try doing it the way your wife told you to

  6. #6
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2010, 2019
    Posts
    40,689

    Re: Lookup to Notepad?? Possible?

    Please Login or Register  to view this content.
    Change the constant sFile to point to your file, then do Alt+F8 and run Init.

    I couldn't load a 250MB string (my dummy dataset created by the last routine) -- I get an "Out of string space" error beyond about 150 MB (about 13M numbers) -- but the function works for me at that size. Curious, a little; Excel only consumes 330MB with that string loaded, and I've used workbooks that consumed well over 1GB.

    If you can load the whole file, you're golden. I have no suggestion otherwise.

  7. #7
    Forum Guru JosephP's Avatar
    Join Date
    03-27-2012
    Location
    Ut
    MS-Off Ver
    2003/10
    Posts
    7,328

    Re: Lookup to Notepad?? Possible?

    fyi your code works for me in xl2011-no issues loading the file into the variable (8GB RAM)

  8. #8
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2010, 2019
    Posts
    40,689

    Re: Lookup to Notepad?? Possible?

    Cool .

+ 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