Results 1 to 4 of 4

Thread: Use VLookup in VBA
Thanks Thanks: 0 Likes Likes: 0

  1. #1
    Board Regular
    Join Date
    Nov 2011
    Posts
    55
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default Use VLookup in VBA

    Can I use vlookup to search values and ranges and two sheets and return results to a blank sheet (Sheet3)? For example, sheet2 has a value in B2. Sheet1 has the same value in E2, but I want to return the value in A2 to sheet3. I want to do this is vba. If possible, any suggestions to get me started? Thanks

  2. #2
    Board Regular alansidman's Avatar
    Join Date
    Feb 2007
    Location
    Steamboat Springs
    Posts
    5,008
    Post Thanks / Like
    Mentioned
    7 Post(s)
    Tagged
    0 Thread(s)

    Default Re: Use VLookup in VBA

    Let me know if that works for you
    Alan

    Am Yisrael Chai

    Win 10--Office 2019
    When Posting Code, please use code tags.
    How to insert Mcode to Power Query https://excel.solutions/2017/11/powe...te-code-video/


  3. #3
    Board Regular DanteAmor's Avatar
    Join Date
    Dec 2018
    Location
    México
    Posts
    6,967
    Post Thanks / Like
    Mentioned
    85 Post(s)
    Tagged
    15 Thread(s)

    Default Re: Use VLookup in VBA

    You can give examples with data of what you have on each sheet, what you want to look for, where you want to search and what result you expect.
    Regards Dante Amor

  4. #4
    Board Regular
    Join Date
    Dec 2017
    Location
    UK
    Posts
    928
    Post Thanks / Like
    Mentioned
    37 Post(s)
    Tagged
    1 Thread(s)

    Default Re: Use VLookup in VBA

    You could have a look at this thread which shows you how to do it in VBA without using Vlookup but in a more flexible programatic way:
    https://www.mrexcel.com/forum/excel-...ternative.html
    Speed up your code use variant arrays and NEVER ACCESS THE WORKSHEET IN A LOOP

Some videos you may like

User Tag List

Tags for this Thread

Like this thread? Share it with others

Like this thread? Share it with others

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •