+ Reply to Thread
Results 1 to 5 of 5

VBA VLOOKUP Question

  1. #1
    Registered User
    Join Date
    08-19-2014
    Location
    PA
    MS-Off Ver
    Office 2013
    Posts
    24

    VBA VLOOKUP Question

    Hi All,

    VBA Newbie here. I have an excel file that has one million rows and a VLOOKUP is taking far too long. I understand that a Macro would save some time? Does anyone know what that code would be? I have attached an Excel file which I am hoping will help.

    Thanks in advance for any and ALL help!

    Sean
    Attached Files Attached Files

  2. #2
    Forum Guru bakerman2's Avatar
    Join Date
    10-03-2012
    Location
    Antwerp, Belgium
    MS-Off Ver
    MO Prof Plus 2016
    Posts
    6,913

    Re: VBA VLOOKUP Question

    You are always looking up a value that's on the same line and get the result on the right of that lookup column ???
    Avoid using Select, Selection and Activate in your code. Use With ... End With instead.
    You can show your appreciation for those that have helped you by clicking the * at the bottom left of any of their posts.

  3. #3
    Registered User
    Join Date
    08-19-2014
    Location
    PA
    MS-Off Ver
    Office 2013
    Posts
    24

    Re: VBA VLOOKUP Question

    Yes, both columns will always be the same. I believe that is what you are asking? Thanks for looking into it!

  4. #4
    Forum Guru bakerman2's Avatar
    Join Date
    10-03-2012
    Location
    Antwerp, Belgium
    MS-Off Ver
    MO Prof Plus 2016
    Posts
    6,913

    Re: VBA VLOOKUP Question

    Then why not just put a reference to the cell in column O ? Or am I missing something ?

  5. #5
    Forum Expert
    Join Date
    07-20-2011
    Location
    Mysore, India.
    MS-Off Ver
    Excel 2019
    Posts
    8,636

    Re: VBA VLOOKUP Question

    Assuming BA and BB columns are free, the folowing code works


    Please Login or Register  to view this content.
    Last edited by kvsrinivasamurthy; 09-19-2017 at 11:57 AM.
    Pl note
    Array formula should be confirmed with Ctrl+Shift+Enter keys together.
    If answere is satisfactory press * to add reputation.

+ 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. Vlookup question
    By bourny in forum Excel General
    Replies: 4
    Last Post: 07-12-2013, 03:48 AM
  2. Excel 2007 : VLOOKUP Question
    By kdrymer in forum Excel General
    Replies: 1
    Last Post: 08-28-2010, 03:47 AM
  3. Vlookup Question-how do I manage the Vlookup?
    By athard in forum Excel General
    Replies: 5
    Last Post: 12-31-2009, 06:04 AM
  4. VLookup question
    By MattGriff in forum Excel General
    Replies: 2
    Last Post: 04-22-2009, 06:37 AM
  5. Vlookup question
    By flowtime in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 07-22-2008, 10:22 PM
  6. VLOOKUP question
    By Somelad in forum Excel General
    Replies: 1
    Last Post: 07-21-2008, 07:03 AM
  7. vlookup question
    By da_franks in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 07-20-2008, 12:29 AM
  8. [SOLVED] VLOOKUP question
    By KenRamoska in forum Excel General
    Replies: 6
    Last Post: 06-21-2005, 12:05 PM

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