VBA Code for Vlookup between two open workbooks


New Member
Mar 11, 2019
I am looking for VBA code to enter vlookupformulas in columns AS through AX (lookup data in column A - varying rowlengths each month). The lookup data will be in another open workbook (prior month (different filename each month: YYYY-MM Project Level (QuickCheck)in columns X through AC. There are 4 tabs in the 'prior month'workbook named the same each month (ORG1, ORG2, ORG3 & ORG4).

I run four separate ORG reports each month and the vlookupformula needs to be pointed to the same ORG tab in the prior month workbook.
For clarification: I run and download into Excel ORG1, thevlookup formula needs to use the prior month file, ORG1 tab to return thevalues.
I have searched and searched and can find VBA that does someof it, but I'm a newbie at VBA and am having a hard time with the two differentworkbooks (even though both are open) and the how to handle the variable tabnames.

Thanks for any assistance. I've been working on this for twodays. I have all of the other pieces that I need; I'm just stuck on this one.

<!--[if !supportLineBreakNewLine]-->

Some videos you may like

Excel Facts

How can you automate Excel?
Press Alt+F11 from Windows Excel to open the Visual Basic for Applications (VBA) editor.

Watch MrExcel Video

Forum statistics

Latest member
Florence Thomas

This Week's Hot Topics

  • Copy entire row if CountA <>0 to another sheet
    [B]I want to copy entire row if CountA <>0 for column J7:AM7 (headers on J6:AM6) and so on till the last used cell is column D and paste the...
  • Select last used Row in Table
    I have created a Table in a Worksheet which is locked to prevent user errors and protect formula. Some of the cells require freetext entries which...
  • excel workbook: do not allow certain file name
    Hello all, Don't think this has ever been asked before, but how do I restrict file save [Before_Save Event] if the name of the file being saved...
  • fixing problem autofilter
    hello i need help about my code when i search by code in textbox it doesn't show anything this is my data [ATTACH type="full"...
  • “Weight”
    Hi, i’ve got a long sheet filled with weights such as kg,g,L & ml. i can build a formula to convert kg into g and liter into ml. How ever, my...
  • How to capitalize everything before a certain character?
    In column A, I have some text: Hello good day.mp3 Hello good day.flac etc. I'd like to capitalize everything before the period. I don't need the...