Results 1 to 10 of 10

Thread: Apply Vlookup formula in all the available sheets in a workbook

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #9
    Junior Member
    Join Date
    Dec 2019
    Posts
    8
    Rep Power
    0
    Hi Alan,

    I am using your code quite well with the previous file names eg Book4_Dec 2019 etc. but, the exact file names are as per the attached (MSCI Equity Index Constituents 20191130)and the code doesn't works would you please suggest any workaround.

    the debugger shows

    Code:
     ThisMonthsLatestBook.Worksheets.Add After:=ThisMonthsLatestBook.Worksheets.Item(Worksheets.Count)
    Also, I tried to edit the vlookup to get the output but it didn't worked

    Code:
    .Range("" & CL(I) & "2:" & CL(I) & "" & OutputLastRow).Value = "=VLOOKUP(" & outputSheet.Name & "!$A2,'" & sourceBook.Path & "\" & "[" & sourceBook.Name & "]" & sourceSheet.Name & "'!$A$2:$P$" & SourceLastRow & ",3,0)"
    the formula should be the one in the code above minus (-) cell value in the range $P. I tried using -$P and also Range $P but, it didn't worked.


    Thanks a lot agin

Similar Threads

  1. Split Workbook In To Sheets, Export To Folder and Move File
    By doug@powerstroke.us in forum Excel Help
    Replies: 2
    Last Post: 05-22-2013, 06:45 PM
  2. Replies: 7
    Last Post: 05-08-2013, 07:12 PM
  3. Vlookup Multiple Values By Adding Formula With Loop In VBA
    By Safal Shrestha in forum Excel Help
    Replies: 15
    Last Post: 04-22-2013, 04:49 PM
  4. Vlookup - Multiple Sheets
    By Suhail in forum Excel Help
    Replies: 3
    Last Post: 01-30-2013, 06:47 PM
  5. Copy Sheets To New Workbook And Save
    By Prabhu in forum Excel Help
    Replies: 5
    Last Post: 09-06-2011, 09:35 PM

Posting Permissions

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