• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Vlookup is prompting to select the sheet in VBA

HI, Thanks for your help in advance

I have created a code to vlookup the values from the other sheets in VBA. But the code is asking to select the file while executing
'Vlookup of data
>>> use code - tags <<<
Code:
Range("O2").Select
ActiveCell.FormulaR1C1 = _
        "=VLOOKUP(RC[-11],'[JLG_NET_DISB.xlsm]Sheet1'!R2C2:R100000C45,28,0)"
Range("O2").Copy
Range("O3:O" & Lrw).PasteSpecial
Range("P2").Select
ActiveCell.FormulaR1C1 = _
        "=VLOOKUP(RC[-12],'[JLG_NET_DISB.xlsm]Sheet1'!R2C2:R100000C45,44,0)"
ActiveCell.Offset(0, 2).FormulaR1C1 = _
        "=VLOOKUP(RC[-14],'[JLG_NET_DISB.xlsm]Sheet1'!R2C2:R100000C55,53,0)"

Running the macro JLG_NET_DISBV2.0, code is asking to select the file, where as I already mentioned the sheet details in the line of code itself.

Thanks
Sharmila
 

Attachments

  • JLG_NET_DISBv2.0.xlsm
    106.7 KB · Views: 1
  • StudyLoan_NetDisbursementReport.xlsx
    233.2 KB · Views: 1
Last edited by a moderator:
Back
Top