Excel function in VBA

  • Thread starter Thread starter Peter
  • Start date Start date
P

Peter

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
 
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Back
Top