Vlookup using VBA

  • I posted this topic before but no responses seemed to help. I will try a different approach to it.


    Below are the values that need to be imported into the next sheet (picture2) referenced through UPC.


    [Blocked Image: http://www.zuko.org/uploader/./userfiles/zuko/gib1.jpg]



    [Blocked Image: http://www.zuko.org/uploader/./userfiles/zuko/gib2.jpg]


    I need to be able to do this for multiple workbooks therefore needs to be written in VBA and ran by the macro. Is it possible to put the data into an array and use vlookup to return only the result of the vlookup into the sheet (picture 2).


    It is really difficult to explain this in text, so if anyone needs more clarification, please let me know. Thank you all in advance.

  • Re: Vlookup using VBA


    You asked this before and got 10 replies, 2 of which were not even replied to.


    http://www.ozgrid.com/forum/showthread.php?t=35608


    So far as I can tell nothing has changed in this post, and the last reponses for the last post were both likely results.


    Alastair

    Einstein:
    Things should be made as simple as possible, but not any simpler


    Be sure to check out TemplateZone for all your Microsoft Office Needs.
    Get OfficeReady Professional 3.0 here!

  • Re: Vlookup using VBA


    I must have missed your last post for some reason. I got it to work, thank you very much. One additional question though.


    In your code



    Everything works but when I do an autofill to go down it takes forever to calculate all those cells. Is there a faster way around it by chance? Way to just paste the values? Thanks!

  • Re: Vlookup using VBA


    In order to just paste, you would need to have copied from somewhere, therefore this is not possible.


    With some adusting you could get the macro to fill in every cell in your range, but i think this would be just as time consuming, as it would have to do it singly (to my knowledge anyway).


    Let me know if you need/want the code updating to do this.


    Alastair

    Einstein:
    Things should be made as simple as possible, but not any simpler


    Be sure to check out TemplateZone for all your Microsoft Office Needs.
    Get OfficeReady Professional 3.0 here!

  • Re: Vlookup using VBA


    Try this



    Alastair

    Einstein:
    Things should be made as simple as possible, but not any simpler


    Be sure to check out TemplateZone for all your Microsoft Office Needs.
    Get OfficeReady Professional 3.0 here!

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!