Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 48
Default 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

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 340
Default 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



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Excel Data Validation/Lookup function does function correcty Kirkey Excel Worksheet Functions 2 May 25th 09 09:22 PM
copy of excel file not showing formulal/function in the function b oaallam Excel Discussion (Misc queries) 4 September 6th 07 01:20 PM
Excel - User Defined Function Error: This function takes no argume BruceInCalgary Excel Programming 3 August 23rd 06 08:53 PM
Adding a custom function to the default excel function list DonutDel Excel Programming 3 November 21st 03 03:41 PM
When I Import an Access Table With an Excel Function in a Cell it Displays as Text not as a Function in Excel Niek Otten Excel Programming 2 September 18th 03 03:55 AM


All times are GMT +1. The time now is 05:03 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"