I am trying to do a vlookup in vba, save the results in a variable and then place the value in a cell. I used to have the vlookup as a function for the cell:
Cells(LastRow, 2).FormulaR1C1 = "=VLOOKUP(R1C2,[Garnishment_2009_4.xls] Sheet1!R3C1:R100C4,4)" However, I don't want it linked, I just want the value saved in the new file. I tried doing the following and I get a syntax error. amount = Application.VLookup(R1C2,[Garnishment_2009_4.xls] Sheet1!R3C1:R100C4,4) What am I doing wrong? --~--~---------~--~----~------------~-------~--~----~ ------------------------------------------------------------------------------------- Some important links for excel users: 1. Excel and VBA Tutorials(Video and Text), Free add-ins downloads at http://www.excelitems.com 2. Excel tutorials at http://www.excel-macros.blogspot.com 3. Learn VBA Macros at http://www.vbamacros.blogspot.com 4. Excel Tips and Tricks at http://exceldailytip.blogspot.com To post to this group, send email to excel-macros@googlegroups.com If you find any spam message in the group, please send an email to: Ayush Jain @ jainayus...@gmail.com or Ashish Jain @ 26may.1...@gmail.com ------------------------------------------------------------------------------------- -~----------~----~----~----~------~----~------~--~---