![]() |
Excel function in VBA
Simple question!
Does anyone have any idea why this line does not work? exchange_rate = Application.VLookup(currency_type, Workbooks("Rej Reason Code Tracker.xls").Sheets("Exchange Rates").Range("R1:R65536"), 2, False) It keeps returning an error. Thanks for your help! Peter |
Excel function in VBA
R1:R65536 is column R, and is one column long. The next argument is "2",
which says to return the second column.... You need to specify two columns!!! Try specifying a cell range. Example: A1:B1000 Bob Flanagan Macro Systems http://www.add-ins.com Productivity add-ins and downloadable books on VB macros for Excel "Peter" wrote in message oups.com... Simple question! Does anyone have any idea why this line does not work? exchange_rate = Application.VLookup(currency_type, Workbooks("Rej Reason Code Tracker.xls").Sheets("Exchange Rates").Range("R1:R65536"), 2, False) It keeps returning an error. Thanks for your help! Peter |
All times are GMT +1. The time now is 05:06 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com