+ Reply to Thread
Results 1 to 23 of 23

Opening latest version of file and then doing vlookup in that file

Hybrid View

  1. #1
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643

    Re: Opening latest version of file and then doing vlookup in that file

    Try something like this, change the destination of the formula as required.
     Set wbVS = Workbooks.Open(myDir & "\" & strFilename)
     
     strFormula = "=INDEX('[" & wbVS.Name & "]VS UK'!$C$27:$C$39,MATCH(VLOOKUP(VLOOKUP(D12&E12,'2013'!$G$3:$J$119,4,FALSE),'" & wbVS.Name & "]VS UK'!$C$27:$C$39,1),'" & wbVS.Name & "]VS UK'!$C$27:$C$39,0)+1)"
    
      ThisWorkbook.Worksheets("Sheet1").Range("A1").Formula = strFormuila
    If posting code please use code tags, see here.

  2. #2
    Registered User
    Join Date
    02-03-2012
    Location
    London
    MS-Off Ver
    Excel 2007
    Posts
    41

    Re: Opening latest version of file and then doing vlookup in that file

    Thanks Norie,

    That seems to work - but how do I place the formula in the cell I want? ie. what do I put in place of ThisWorkbook.?

    Regards

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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